我喜欢b站-1010(5)
if isHTTPS {
cdnDomain = this.CDNHttps
}
if !strings.HasSuffix(cdnDomain, "/") {
cdnDomain = "/"
}
return cdnDomain
}
func PrintVersion(w io.Writer) {
if !flag.Parsed() {
flag.Parse()
}
if showVersion == nil || !*showVersion {
return
}
fmt.Fprintf(w, "Binary: %s ", app.Name)
fmt.Fprintf(w, "Version: %s ", app.Version)
fmt.Fprintf(w, "Build: %s ", app.Build)
fmt.Fprintf(w, "Compile date: %s ", app.Date.Format("2006-01-02 15:04:05"))
fmt.Fprintf(w, "Env: %s ", app.Env)
os.Exit(0)
}
func OnlineEnv() bool {
return app.Env == PRO
}