diff --git a/cmd/system-cli/main.go b/cmd/system-cli/main.go index 93f58d965..cec052b8b 100644 --- a/cmd/system-cli/main.go +++ b/cmd/system-cli/main.go @@ -44,5 +44,6 @@ func cliRouter(commands ...string) { switch commands[0] { case "users": cliExecUsers(commands[1:]...) + default: } } diff --git a/crm/repository/record_report_builder.go b/crm/repository/record_report_builder.go index 7ccf421b4..43e152490 100644 --- a/crm/repository/record_report_builder.go +++ b/crm/repository/record_report_builder.go @@ -159,6 +159,7 @@ func (b recordReportBuilder) Cast(row sqlx.ColScanner) map[string]interface{} { switch cv := v.(type) { case []uint8: out[k] = string(cv) + default: } } diff --git a/crm/start.go b/crm/start.go index 78518dc57..2bfbae2bf 100644 --- a/crm/start.go +++ b/crm/start.go @@ -24,8 +24,8 @@ import ( ) var ( - jwtVerifier (func(http.Handler) http.Handler) - jwtAuthenticator (func(http.Handler) http.Handler) + jwtVerifier func(http.Handler) http.Handler + jwtAuthenticator func(http.Handler) http.Handler jwtEncoder auth.TokenEncoder ) diff --git a/internal/config/social.go b/internal/config/social.go index ebe3a227d..bfc9be52d 100644 --- a/internal/config/social.go +++ b/internal/config/social.go @@ -57,7 +57,7 @@ func (*Social) Init(prefix ...string) *Social { } social = new(Social) - flag.BoolVar(&social.Enabled, "auth-social-enabled", true, "SocialAuth enabled") + flag.BoolVar(&social.Enabled, "auth-social-enabled", false, "SocialAuth enabled") b("Facebook", &social.FacebookKey, &social.FacebookSecret) b("GPlus", &social.GPlusKey, &social.GPlusSecret) diff --git a/messaging/rest/handlers/attachment_custom.go b/messaging/rest/handlers/attachment_custom.go index 1b43af780..61aec7ab5 100644 --- a/messaging/rest/handlers/attachment_custom.go +++ b/messaging/rest/handlers/attachment_custom.go @@ -26,7 +26,7 @@ type Downloadable interface { func NewAttachmentDownloadable(ah AttachmentAPI) *Attachment { serve := func(f interface{}, err error, w http.ResponseWriter, r *http.Request) { if err != nil { - switch true { + switch { // @todo: compare concrete exported error type? Go2 .As() like check? case err.Error() == "crust.messaging.repository.AttachmentNotFound": w.WriteHeader(http.StatusNotFound) diff --git a/messaging/service/events.go b/messaging/service/events.go index 3687cdc47..aa0c70cc1 100644 --- a/messaging/service/events.go +++ b/messaging/service/events.go @@ -47,7 +47,7 @@ func (svc *event) Message(m *types.Message) error { func (svc *event) MessageFlag(f *types.MessageFlag) error { var p outgoing.MessageEncoder - switch true { + switch { case f.IsBookmark(): // Leaving this here so it is obvious. return nil diff --git a/messaging/start.go b/messaging/start.go index 61c3bbb1b..9c8956939 100644 --- a/messaging/start.go +++ b/messaging/start.go @@ -24,8 +24,8 @@ import ( ) var ( - jwtVerifier (func(http.Handler) http.Handler) - jwtAuthenticator (func(http.Handler) http.Handler) + jwtVerifier func(http.Handler) http.Handler + jwtAuthenticator func(http.Handler) http.Handler jwtEncoder auth.TokenEncoder ) diff --git a/system/repository/user.go b/system/repository/user.go index 933995da0..ec3a6da66 100644 --- a/system/repository/user.go +++ b/system/repository/user.go @@ -186,6 +186,7 @@ func (r *user) prepare(user *types.User, fields ...string) (err error) { } user.Teams = teams } + default: } } return diff --git a/system/start.go b/system/start.go index 72f5428dc..3ea6c8202 100644 --- a/system/start.go +++ b/system/start.go @@ -23,8 +23,8 @@ import ( ) var ( - jwtVerifier (func(http.Handler) http.Handler) - jwtAuthenticator (func(http.Handler) http.Handler) + jwtVerifier func(http.Handler) http.Handler + jwtAuthenticator func(http.Handler) http.Handler jwtEncoder auth.TokenEncoder )