github.com/stffabi/git-lfs@v2.3.5-0.20180214015214-8eeaa8d88902+incompatible/git/odb/errors.go (about)

     1  package odb
     2  
     3  import "fmt"
     4  
     5  // UnexpectedObjectType is an error type that represents a scenario where an
     6  // object was requested of a given type "Wanted", and received as a different
     7  // _other_ type, "Wanted".
     8  type UnexpectedObjectType struct {
     9  	// Got was the object type requested.
    10  	Got ObjectType
    11  	// Wanted was the object type received.
    12  	Wanted ObjectType
    13  }
    14  
    15  // Error implements the error.Error() function.
    16  func (e *UnexpectedObjectType) Error() string {
    17  	return fmt.Sprintf("git/odb: unexpected object type, got: %q, wanted: %q", e.Got, e.Wanted)
    18  }