thrawn01/args

View on GitHub
args.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function StringToMap has 6 return statements (exceeds 4 allowed).
Open

func StringToMap(value string) (map[string]string, error) {
    tokenizer := NewKeyValueTokenizer(value)
    result := make(map[string]string)

    var lvalue, rvalue, expression string
Severity: Major
Found in args.go - About 40 mins to fix

    Function castStringSlice has 5 return statements (exceeds 4 allowed).
    Open

    func castStringSlice(name string, dest interface{}, value interface{}) (interface{}, error) {
        // If our destination is nil, init a new slice
        if dest == nil {
            dest = make([]string, 0)
        }
    Severity: Major
    Found in args.go - About 35 mins to fix

      Function castBool has 5 return statements (exceeds 4 allowed).
      Open

      func castBool(name string, dest interface{}, value interface{}) (interface{}, error) {
          // If value is nil, return the type default
          if value == nil {
              return false, nil
          }
      Severity: Major
      Found in args.go - About 35 mins to fix

        Function castStringMap has 5 return statements (exceeds 4 allowed).
        Open

        func castStringMap(name string, dest interface{}, value interface{}) (interface{}, error) {
            // If our destination is nil, init a new slice
            if dest == nil {
                dest = make(map[string]string, 0)
            }
        Severity: Major
        Found in args.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status