Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
RangelReale committed Jul 5, 2023
1 parent 0335a6f commit 4364cd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
4 changes: 2 additions & 2 deletions tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ func (t *TagOptions) Get(name string) (string, bool) {
}

func (t *TagOptions) Value(name string, defaultValue string) string {
if tv, ok := t.options[name]; ok {
if tv, ok := t.Get(name); ok {
return tv
}
return defaultValue
}

func (t *TagOptions) BoolValue(name string, defaultValue bool) (bool, error) {
if tv, ok := t.options[name]; ok {
if tv, ok := t.Get(name); ok {
b, err := strconv.ParseBool(tv)
if err != nil {
return false, err
Expand Down
18 changes: 0 additions & 18 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@ func reflectValueElem(t reflect.Value) reflect.Value {
return t
}

func unpointValue(value reflect.Value) reflect.Value {
if value.Kind() == reflect.Ptr {
return reflect.Indirect(value)
}
return value
}

func unpointType(typ reflect.Type) reflect.Type {
if typ.Kind() == reflect.Ptr {
return typ.Elem()
}
return typ
}

func structFieldName(structTyp reflect.Type, fieldName string) string {
if fieldName == "" {
return structTyp.String()
Expand Down Expand Up @@ -100,7 +86,3 @@ func (s level) StringPathWithName(name string) string {
func (s level) Path() []string {
return s.names
}

func (s level) PathWithName(name string) []string {
return append(append([]string{}, s.names...), name)
}

0 comments on commit 4364cd4

Please sign in to comment.