chore: refactor, better goctl message (#1228)

master
Kevin Wan 3 years ago committed by GitHub
parent 4f5c30e083
commit a6c8113419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -79,14 +79,15 @@ func isOriginAllowed(allows []string, origin string) bool {
}
func setHeader(w http.ResponseWriter, origin string) {
w.Header().Set(allowOrigin, origin)
w.Header().Set(allowMethods, methods)
w.Header().Set(allowHeaders, allowHeadersVal)
w.Header().Set(exposeHeaders, exposeHeadersVal)
header := w.Header()
header.Set(allowOrigin, origin)
header.Set(allowMethods, methods)
header.Set(allowHeaders, allowHeadersVal)
header.Set(exposeHeaders, exposeHeadersVal)
if origin != allOrigins {
w.Header().Set(allowCredentials, allowTrue)
header.Set(allowCredentials, allowTrue)
}
w.Header().Set(maxAgeHeader, maxAgeHeaderVal)
header.Set(maxAgeHeader, maxAgeHeaderVal)
}
func setVaryHeaders(w http.ResponseWriter, r *http.Request) {

@ -77,7 +77,7 @@ func DockerCommand(c *cli.Context) (err error) {
projDir, ok := util.FindProjectPath(goFile)
if ok {
fmt.Printf("Hint: run \"docker build ...\" command in dir %q\n", projDir)
fmt.Printf("Hint: run \"docker build ...\" command in dir:\n %s\n", projDir)
}
return nil

Loading…
Cancel
Save