INNER CODE UNIT · Go

probeVersion

grpc-ecosystem/grpc-health-probe · main.go:220

func probeVersion() string {
	version := "vcs info was not included in build"
	dirty := ""

	if info, ok := debug.ReadBuildInfo(); ok {
		for _, setting := range info.Settings {

			switch setting.Key {
			case "vcs.revision":
				version = "commit " + setting.Value
			case "vcs.modified":
				dirty = setting.Value
			}
		}
	}
	if dirty == "true" {
		version = version + " (dirty)"
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…