fix gctx init slice bounds out of range on ios platform (#2062)

This commit is contained in:
OmegaMT
2022-08-15 20:40:17 +08:00
committed by GitHub
parent e4c8cfc16b
commit 897d6d9ad0

View File

@ -33,6 +33,9 @@ func init() {
i := 0
for _, s := range os.Environ() {
i = strings.IndexByte(s, '=')
if i == -1 {
continue
}
m[s[0:i]] = s[i+1:]
}
// OpenTelemetry from environments.