Last active
November 26, 2015 02:39
-
-
Save duglin/cca989a48fff40555265 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package api | |
... | |
func ResolveVersion() string { | |
version := "1.21" | |
if tmp := os.Getenv("DOCKER_API_VERSION"); tmp != "" { | |
version = tmp | |
} | |
return tmp | |
} | |
Then any current uses of: | |
api.Version | |
become: | |
api.ResolveVersion() | |
or rename to: | |
api.Version() | |
if that's less confusing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment