Skip to content

Commit

Permalink
fix: fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalcaliskan committed Jan 7, 2024
1 parent 4493b18 commit 3b5abb4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/foo/foo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,24 @@ import (

rootopts "github.com/bilalcaliskan/split-the-tunnel/cmd/root/options"

"github.com/bilalcaliskan/split-the-tunnel/internal/logging"
"github.com/rs/zerolog"
"github.com/spf13/cobra"
)

func init() {
logger = logging.GetLogger()
//logger = logging.GetLogger()
fooOpts = options.GetFooOptions()
fooOpts.InitFlags(FooCmd)
}

var (
logger zerolog.Logger
//logger zerolog.Logger
fooOpts *options.FooOptions
// FooCmd represents the bar command
FooCmd = &cobra.Command{
Use: "foo",
Short: "",
PreRunE: func(cmd *cobra.Command, args []string) error {
logger = cmd.Context().Value(rootopts.LoggerKey{}).(zerolog.Logger)
//logger = cmd.Context().Value(rootopts.LoggerKey{}).(zerolog.Logger)
rootOpts := cmd.Context().Value(rootopts.OptsKey{}).(*rootopts.RootOptions)
fooOpts.RootOptions = rootOpts

Expand Down

0 comments on commit 3b5abb4

Please sign in to comment.