package main import "fmt" var gitDescribe string func version() (string, error) { if gitDescribe == "" { return "", fmt.Errorf("No version information available") } return gitDescribe, nil }