From 2a14bb362a7e7a5bdb36993c2da0d325510d6f17 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 2 Nov 2021 14:48:40 +0100 Subject: [PATCH] fix smells --- accounts/pkg/command/root.go | 5 ----- ocis-pkg/service/http/service.go | 9 --------- ocis/pkg/command/root.go | 3 +++ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/accounts/pkg/command/root.go b/accounts/pkg/command/root.go index 3109ae54b1..0c0e3d8508 100644 --- a/accounts/pkg/command/root.go +++ b/accounts/pkg/command/root.go @@ -12,11 +12,6 @@ import ( "github.com/urfave/cli/v2" ) -var ( - defaultConfigPaths = []string{"/etc/ocis", "$HOME/.ocis", "./config"} - defaultFilename = "accounts" -) - // Execute is the entry point for the ocis-accounts command. func Execute(cfg *config.Config) error { app := &cli.App{ diff --git a/ocis-pkg/service/http/service.go b/ocis-pkg/service/http/service.go index 98317e7a9a..2af5e9d7e5 100644 --- a/ocis-pkg/service/http/service.go +++ b/ocis-pkg/service/http/service.go @@ -1,7 +1,6 @@ package http import ( - "crypto/tls" "strings" "time" @@ -34,11 +33,3 @@ func NewService(opts ...Option) Service { return Service{micro.NewService(wopts...)} } - -func transport(secure *tls.Config) string { - if secure != nil { - return "https" - } - - return "http" -} diff --git a/ocis/pkg/command/root.go b/ocis/pkg/command/root.go index 43fbafa8ba..75408d5d79 100644 --- a/ocis/pkg/command/root.go +++ b/ocis/pkg/command/root.go @@ -75,6 +75,9 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error { } err = cnf.BindStruct("", cfg) + if err != nil { + return err + } return nil }