Files
athens/pkg/config/module.go
Marwan Sulaiman 0853f073f2 Athens: introduce pkg/errors (#320)
* Athens: introduce pkg/errors

* errors: fix Ops loop

* pkg/errors: introduce M and V types to get rid of unstable parsing

* fix build

* errors: fix text + add tests

* pr updates
2018-07-25 13:18:58 -05:00

16 lines
428 B
Go

package config
import "fmt"
// PackageVersionedName return package full name used in storage.
// E.g athens/@v/v1.0/go.mod
func PackageVersionedName(module, version, ext string) string {
return fmt.Sprintf("%s/@v/%s.%s", module, version, ext)
}
// FmtModVer is a helper function that can take
// pkg/a/b and v2.3.1 and returns pkg/a/b@v2.3.1
func FmtModVer(mod, ver string) string {
return fmt.Sprintf("%s@%s", mod, ver)
}