Added a convention that sentinel errors go near the top of the file, and applied it
This commit is contained in:
1 parent
848edc73e2
commit
e32e270db0
5 files changed
+44
-16
No files matched your search
@@ -5,6 +5,10 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ErrWonAndLost is returned by OpportunityMarks.Validate when both Won and
|
||||
// Lost are set.
|
||||
var ErrWonAndLost = errors.New("types: an opportunity cannot be both won and lost")
|
||||
|
||||
// Opportunity is a procurement opportunity (an OCDS contracting process,
|
||||
// identified by UUID) as of its latest release, with its classifications,
|
||||
// releases and the user's marks. Fields tagged db:"-" are stored in their
|
||||
@@ -51,10 +55,6 @@ type OpportunityReleaseTag struct {
|
||||
Tag string `db:"tag" json:"tag"`
|
||||
}
|
||||
|
||||
// ErrWonAndLost is returned by OpportunityMarks.Validate when both Won and
|
||||
// Lost are set.
|
||||
var ErrWonAndLost = errors.New("types: an opportunity cannot be both won and lost")
|
||||
|
||||
// OpportunityMarks are the user's own marks on an opportunity, kept apart
|
||||
// from the fetched data so saving a newer release never changes them. The
|
||||
// marks are independent except that Won and Lost exclude each other (see
|
||||
|
||||
Reference in new issue
Block a user