MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / getBuildInfo

Function getBuildInfo

server/error_page.go:131–143  ·  view source on GitHub ↗

getBuildInfo returns the Go version and Git commit hash.

()

Source from the content-addressed store, hash-verified

129
130// getBuildInfo returns the Go version and Git commit hash.
131func getBuildInfo() (string, string) {
132 gover := runtime.Version()
133
134 if info, ok := debug.ReadBuildInfo(); ok {
135 for _, setting := range info.Settings {
136 if setting.Key == "vcs.revision" {
137 return gover, setting.Value
138 }
139 }
140 }
141
142 return gover, ""
143}
144
145// generateErrorHTML renders the error page template with the given error information.
146// It returns the generated HTML as a byte slice and a Content-Type string.

Callers 1

generateErrorHTMLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected