adjust comments on error messages to standard godoc style
This commit is contained in:
parent
b660db0a4b
commit
8982f4b3be
58
git.go
58
git.go
|
@ -50,31 +50,43 @@ const (
|
||||||
type ErrorCode int
|
type ErrorCode int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ErrOk ErrorCode = C.GIT_OK /*< No error */
|
|
||||||
|
|
||||||
ErrGeneric = C.GIT_ERROR /*< Generic error */
|
// No error
|
||||||
ErrNotFound = C.GIT_ENOTFOUND /*< Requested object could not be found */
|
ErrOk ErrorCode = C.GIT_OK
|
||||||
ErrExists = C.GIT_EEXISTS /*< Object exists preventing operation */
|
// Generic error
|
||||||
ErrAmbigious = C.GIT_EAMBIGUOUS /*< More than one object matches */
|
ErrGeneric = C.GIT_ERROR
|
||||||
ErrBuffs = C.GIT_EBUFS /*< Output buffer too short to hold data */
|
// Requested object could not be found
|
||||||
|
ErrNotFound = C.GIT_ENOTFOUND
|
||||||
/* GIT_EUSER is a special error that is never generated by libgit2
|
// Object exists preventing operation
|
||||||
* code. You can return it from a callback (e.g to stop an iteration)
|
ErrExists = C.GIT_EEXISTS
|
||||||
* to know that it was generated by the callback and not by libgit2.
|
// More than one object matches
|
||||||
*/
|
ErrAmbigious = C.GIT_EAMBIGUOUS
|
||||||
|
// Output buffer too short to hold data
|
||||||
|
ErrBuffs = C.GIT_EBUFS
|
||||||
|
// GIT_EUSER is a special error that is never generated by libgit2
|
||||||
|
// code. You can return it from a callback (e.g to stop an iteration)
|
||||||
|
// to know that it was generated by the callback and not by libgit2.
|
||||||
ErrUser = C.GIT_EUSER
|
ErrUser = C.GIT_EUSER
|
||||||
|
// Operation not allowed on bare repository
|
||||||
ErrBareRepo = C.GIT_EBAREREPO /*< Operation not allowed on bare repository */
|
ErrBareRepo = C.GIT_EBAREREPO
|
||||||
ErrUnbornBranch = C.GIT_EUNBORNBRANCH /*< HEAD refers to branch with no commits */
|
// HEAD refers to branch with no commits
|
||||||
ErrUnmerged = C.GIT_EUNMERGED /*< Merge in progress prevented operation */
|
ErrUnbornBranch = C.GIT_EUNBORNBRANCH
|
||||||
ErrNonFastForward = C.GIT_ENONFASTFORWARD /*< Reference was not fast-forwardable */
|
// Merge in progress prevented operation
|
||||||
ErrInvalidSpec = C.GIT_EINVALIDSPEC /*< Name/ref spec was not in a valid format */
|
ErrUnmerged = C.GIT_EUNMERGED
|
||||||
ErrMergeConflict = C.GIT_EMERGECONFLICT /*< Merge conflicts prevented operation */
|
// Reference was not fast-forwardable
|
||||||
ErrLocked = C.GIT_ELOCKED /*< Lock file prevented operation */
|
ErrNonFastForward = C.GIT_ENONFASTFORWARD
|
||||||
ErrModified = C.GIT_EMODIFIED /*< Reference value does not match expected */
|
// Name/ref spec was not in a valid format
|
||||||
|
ErrInvalidSpec = C.GIT_EINVALIDSPEC
|
||||||
ErrPassthrough = C.GIT_PASSTHROUGH /*< Internal only */
|
// Merge conflicts prevented operation
|
||||||
ErrIterOver = C.GIT_ITEROVER /*< Signals end of iteration with iterator */
|
ErrMergeConflict = C.GIT_EMERGECONFLICT
|
||||||
|
// Lock file prevented operation
|
||||||
|
ErrLocked = C.GIT_ELOCKED
|
||||||
|
// Reference value does not match expected
|
||||||
|
ErrModified = C.GIT_EMODIFIED
|
||||||
|
// Internal only
|
||||||
|
ErrPassthrough = C.GIT_PASSTHROUGH
|
||||||
|
// Signals end of iteration with iterator
|
||||||
|
ErrIterOver = C.GIT_ITEROVER
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
Loading…
Reference in New Issue