diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-04-05 01:20:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 07:20:50 +0100 |
commit | baadb51445b1d990f72a37b0ef7575f5ed72824a (patch) | |
tree | 192fa25f2dc144bfa5c78adafc9ccd8f92db86bb /vendor/golang.org/x/mod | |
parent | b74d30ae275b4f025f689efca748dd0cbd826b22 (diff) | |
download | gitea-baadb51445b1d990f72a37b0ef7575f5ed72824a.tar.gz gitea-baadb51445b1d990f72a37b0ef7575f5ed72824a.zip |
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>
Diffstat (limited to 'vendor/golang.org/x/mod')
-rw-r--r-- | vendor/golang.org/x/mod/module/module.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/golang.org/x/mod/module/module.go b/vendor/golang.org/x/mod/module/module.go index 21f123957d..6cd37280a8 100644 --- a/vendor/golang.org/x/mod/module/module.go +++ b/vendor/golang.org/x/mod/module/module.go @@ -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 } |