glog.go
func (t *TraceLocation) Set(value string) error {
	if value == "" {
		// Unset.
		t.line = 0
		t.file = ""
	}
	fields := strings.Split(value, ":")
	if len(fields) != 2 {
		return errTraceSyntax
	}
	file, line := fields[0], fields[1]
	if !strings.Contains(file, ".") {
		return errTraceSyntax
	}
	v, err := strconv.Atoi(line)
	if err != nil {
		return errTraceSyntax
	}
	if v <= 0 {
		return errors.New("negative or zero value for level")
	}
	t.line = v
	t.file = file
	return nil
}
func (t *TraceLocation) Set(value string) error {
	if value == "" {
		// Unset.
		t.line = 0
		t.file = ""
	}
	fields := strings.Split(value, ":")
	if len(fields) != 2 {
		return errTraceSyntax
	}
	file, line := fields[0], fields[1]
	if !strings.Contains(file, ".") {
		return errTraceSyntax
	}
	v, err := strconv.Atoi(line)
	if err != nil {
		return errTraceSyntax
	}
	if v <= 0 {
		return errors.New("negative or zero value for level")
	}
	t.line = v
	t.file = file
	return nil
}
func ( t * TraceLocation ) Set ( value string ) error { if value == " " { // Unset. t . line = 0 t . file = " " } fields := strings . Split ( value , " " ) if len ( fields ) != 2 { return errTraceSyntax } file , line := fields [ 0 ] , fields [ 1 ] if ! strings . Contains ( file , " " ) { return errTraceSyntax } v , err := strconv . Atoi ( line ) if err != nil { return errTraceSyntax } if v <= 0 { return errors . New ( " " ) } t . line = v t . file = file return nil }
// Syntax: gopherflakes.go:234
// Note that unlike vmodule the file extension is included here.
Syntax : gopherflakes . go : 234 Note that unlike vmodule the file extension is included here .