Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mars315 committed Jan 3, 2024
1 parent 0b6e0c4 commit 87940a7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion example/full/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ package main
import (
"encoding/json"
"fmt"
"time"

"github.com/mars315/autoflags"
"github.com/spf13/cobra"
"time"
)

func main() {
Expand Down
1 change: 1 addition & 0 deletions example/simple/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"

"github.com/mars315/autoflags"
"github.com/spf13/cobra"
)
Expand Down
3 changes: 1 addition & 2 deletions flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ package autoflags

import (
"fmt"
"github.com/mars315/autoflags/lib/stringx"
"reflect"
"strings"
"time"

"github.com/mars315/autoflags/lib/stringx"
"github.com/mitchellh/mapstructure"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
Expand Down Expand Up @@ -430,7 +430,6 @@ func parseTag(field reflect.StructField, cfg *FlagConfig) *tagData {

// getTag .
func getTag(field reflect.StructField, cfg *FlagConfig) *tagData {

fulls, ok := field.Tag.Lookup(cfg.tagName)

// ignore untagged field
Expand Down
3 changes: 2 additions & 1 deletion lib/stringx/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
package stringx

import (
"github.com/mars315/autoflags/lib/builtin"
"strconv"
"strings"

"github.com/mars315/autoflags/lib/builtin"
)

func ToBool(s string) bool {
Expand Down

0 comments on commit 87940a7

Please sign in to comment.