doc: improve and reference existing bug in the code (#356)

This commit is contained in:
Simone Basso
2021-06-04 12:50:23 +02:00
committed by GitHub
parent 4764d7f378
commit 944d3c53fa
3 changed files with 16 additions and 11 deletions
+3 -7
View File
@@ -1,5 +1,5 @@
// Package platform returns the platform name. The name returned here
// is compatible with the names returned by Measurement Kit.
// Package platform allows you to obtain the platform name. We use this
// information to annotate measurements.
package platform
import "runtime"
@@ -18,11 +18,7 @@ import "runtime"
//
// 5. "unknown"
//
// The android, ios, linux, macos, windows, and unknown strings are
// also returned by Measurement Kit. As a known bug, the detection of
// darwin-based systems relies on the architecture, when CGO support
// has been disabled. In such case, the code will return "ios" when
// using arm{,64} and "macos" when using x86{,_64}.
// You should use this name to annotate measurements.
func Name() string {
return name(runtime.GOOS)
}