diff options
| author | Nicolas Paul <n@nc0.fr> | 2023-05-31 12:32:17 +0200 |
|---|---|---|
| committer | Nicolas Paul <n@nc0.fr> | 2023-05-31 12:32:17 +0200 |
| commit | e28b6f056b57f1a5199f1d233cecf3d5527ad89b (patch) | |
| tree | 84bc7b863ed18b347ab98263a5084e9a84b89fa3 /pkg/types/module.go | |
| parent | e8b78cae016f7b3e05766b964b2618245fb0e021 (diff) | |
Move types in their own files
Signed-off-by: Nicolas Paul <n@nc0.fr>
Diffstat (limited to 'pkg/types/module.go')
| -rw-r--r-- | pkg/types/module.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pkg/types/module.go b/pkg/types/module.go new file mode 100644 index 0000000..0c4e8af --- /dev/null +++ b/pkg/types/module.go @@ -0,0 +1,25 @@ +package types + +// Vcs is an enum for version control systems supported by the standard Go +// toolchain. +// +// See https://pkg.go.dev/cmd/go#hdr-Module_configuration_for_non_public_modules +type Vcs string + +// Vcs enum. +const ( + VcsBazaar Vcs = "bzr" + VcsFossil Vcs = "fossil" + VcsGit Vcs = "git" + VcsMercurial Vcs = "hg" + VcsSubversion Vcs = "svn" +) + +// Module represents a Go module to index. +type Module struct { + Path string // module path (without domain) + Vcs Vcs // vcs system + Repo string // repository's home + Dir string // url template + File string // url template +} |
