lint code
This commit is contained in:
7
utils.go
7
utils.go
@ -47,7 +47,7 @@ func WrapH(h http.Handler) HandlerFunc {
|
||||
|
||||
type H map[string]interface{}
|
||||
|
||||
// Allows type H to be used with xml.Marshal
|
||||
// MarshalXML allows type H to be used with xml.Marshal
|
||||
func (h H) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
|
||||
start.Name = xml.Name{
|
||||
Space: "",
|
||||
@ -143,10 +143,9 @@ func resolveAddress(addr []string) string {
|
||||
if port := os.Getenv("PORT"); len(port) > 0 {
|
||||
debugPrint("Environment variable PORT=\"%s\"", port)
|
||||
return ":" + port
|
||||
} else {
|
||||
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
|
||||
return ":8080"
|
||||
}
|
||||
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
|
||||
return ":8080"
|
||||
case 1:
|
||||
return addr[0]
|
||||
default:
|
||||
|
Reference in New Issue
Block a user