aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/mod
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2020-04-05 01:20:50 -0500
committerGitHub <noreply@github.com>2020-04-05 07:20:50 +0100
commitbaadb51445b1d990f72a37b0ef7575f5ed72824a (patch)
tree192fa25f2dc144bfa5c78adafc9ccd8f92db86bb /vendor/golang.org/x/mod
parentb74d30ae275b4f025f689efca748dd0cbd826b22 (diff)
downloadgitea-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.go6
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
}