cloudflare/cloudflared
Publicmirrored from https://github.com/cloudflare/cloudflaredAvailable
origin/build_info.go
19lines · modecode
| 1 | package origin |
| 2 | |
| 3 | import ( |
| 4 | "runtime" |
| 5 | ) |
| 6 | |
| 7 | type BuildInfo struct { |
| 8 | GoOS string `json:"go_os"` |
| 9 | GoVersion string `json:"go_version"` |
| 10 | GoArch string `json:"go_arch"` |
| 11 | } |
| 12 | |
| 13 | func GetBuildInfo() *BuildInfo { |
| 14 | return &BuildInfo{ |
| 15 | GoOS: runtime.GOOS, |
| 16 | GoVersion: runtime.Version(), |
| 17 | GoArch: runtime.GOARCH, |
| 18 | } |
| 19 | } |
| 20 | |