1
0
Fork 0
forked from forgejo/forgejo

Add gitea-vet (#10948)

* Add copyright

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add gitea-vet and fix non-compliance

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Combine tools.go into build.go and clean up

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove extra GO111MODULE=on

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser 2020-04-05 01:20:50 -05:00 committed by GitHub
parent b74d30ae27
commit baadb51445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 2990 additions and 101 deletions

View file

@ -123,8 +123,12 @@ type Version struct {
Version string `json:",omitempty"`
}
// String returns the module version syntax Path@Version.
// String returns a representation of the Version suitable for logging
// (Path@Version, or just Path if Version is empty).
func (m Version) String() string {
if m.Version == "" {
return m.Path
}
return m.Path + "@" + m.Version
}