Source File
resource.go
Belonging Package
go.opencensus.io/resource
package resource
import (
)
const (
EnvVarType = "OC_RESOURCE_TYPE"
EnvVarLabels = "OC_RESOURCE_LABELS"
)
= strings.TrimRight(strings.TrimSpace(), ",") + ","
for len() > 0 {
:= labelRegex.FindStringSubmatch()
if len() == 0 {
return nil, fmt.Errorf("invalid label formatting, remainder: %s", )
}
:= [2]
if == "" {
= [3]
} else {
var error
if , = strconv.Unquote(); != nil {
return nil, fmt.Errorf("invalid label formatting, remainder: %s, err: %s", , )
}
}
[[1]] =
= [len([0]):]
}
return , nil
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |