diff options
| author | Jesse Ezell <[email protected]> | 2014-04-04 00:14:31 -0700 |
|---|---|---|
| committer | Jesse Ezell <[email protected]> | 2014-04-04 00:14:31 -0700 |
| commit | 8982f4b3be90a04b0fad24da1ee6d85b1caad336 (patch) | |
| tree | bc42cf7a253738745faac9668bfb46db9dc722f8 | |
| parent | b660db0a4bf82af893e7eb120c3001cecf593fa0 (diff) | |
adjust comments on error messages to standard godoc style
| -rw-r--r-- | git.go | 58 |
1 files changed, 35 insertions, 23 deletions
@@ -50,31 +50,43 @@ const ( type ErrorCode int const ( - ErrOk ErrorCode = C.GIT_OK /*< No error */ - ErrGeneric = C.GIT_ERROR /*< Generic error */ - ErrNotFound = C.GIT_ENOTFOUND /*< Requested object could not be found */ - ErrExists = C.GIT_EEXISTS /*< Object exists preventing operation */ - ErrAmbigious = C.GIT_EAMBIGUOUS /*< More than one object matches */ - ErrBuffs = C.GIT_EBUFS /*< Output buffer too short to hold data */ - - /* 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. - */ + // No error + ErrOk ErrorCode = C.GIT_OK + // Generic error + ErrGeneric = C.GIT_ERROR + // Requested object could not be found + ErrNotFound = C.GIT_ENOTFOUND + // Object exists preventing operation + ErrExists = C.GIT_EEXISTS + // 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 - - ErrBareRepo = C.GIT_EBAREREPO /*< Operation not allowed on bare repository */ - ErrUnbornBranch = C.GIT_EUNBORNBRANCH /*< HEAD refers to branch with no commits */ - ErrUnmerged = C.GIT_EUNMERGED /*< Merge in progress prevented operation */ - ErrNonFastForward = C.GIT_ENONFASTFORWARD /*< Reference was not fast-forwardable */ - ErrInvalidSpec = C.GIT_EINVALIDSPEC /*< Name/ref spec was not in a valid format */ - ErrMergeConflict = C.GIT_EMERGECONFLICT /*< Merge conflicts prevented operation */ - ErrLocked = C.GIT_ELOCKED /*< Lock file prevented operation */ - ErrModified = C.GIT_EMODIFIED /*< Reference value does not match expected */ - - ErrPassthrough = C.GIT_PASSTHROUGH /*< Internal only */ - ErrIterOver = C.GIT_ITEROVER /*< Signals end of iteration with iterator */ + // Operation not allowed on bare repository + ErrBareRepo = C.GIT_EBAREREPO + // HEAD refers to branch with no commits + ErrUnbornBranch = C.GIT_EUNBORNBRANCH + // Merge in progress prevented operation + ErrUnmerged = C.GIT_EUNMERGED + // Reference was not fast-forwardable + ErrNonFastForward = C.GIT_ENONFASTFORWARD + // Name/ref spec was not in a valid format + ErrInvalidSpec = C.GIT_EINVALIDSPEC + // Merge conflicts prevented operation + 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() { |
