type/conversion/conversion.go

Summary

Maintainability
A
3 hrs
Test Coverage
D
60%

Function convertFrom has 54 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func convertFrom(v, w reflect.Value) error {

    errConversion := fmt.Errorf("Failed to convert %v into %v",
        v.Type(), w.Type())

Severity: Minor
Found in type/conversion/conversion.go - About 1 hr to fix

    Function convertFrom has 7 return statements (exceeds 4 allowed).
    Open

    func convertFrom(v, w reflect.Value) error {
    
        errConversion := fmt.Errorf("Failed to convert %v into %v",
            v.Type(), w.Type())
    
    
    Severity: Major
    Found in type/conversion/conversion.go - About 45 mins to fix

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

      func convertMap(v, w reflect.Value) error {
          if w.Kind() != reflect.Map {
              return fmt.Errorf("Failed to convert map %v into %v",
                  v.Type(), w.Type())
          }
      Severity: Major
      Found in type/conversion/conversion.go - About 40 mins to fix

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

        func convertSlice(v, w reflect.Value) error {
            if w.Kind() != reflect.Slice {
                return fmt.Errorf("Failed to convert slice %v into %v",
                    v.Type(), w.Type())
            }
        Severity: Major
        Found in type/conversion/conversion.go - About 40 mins to fix

          exported function AsInt64 should have comment or be unexported
          Open

          func AsInt64(w reflect.Value) (int64, bool) {
          Severity: Minor
          Found in type/conversion/conversion.go by golint

          There are no issues that match your filters.

          Category
          Status