xtool/cpgithubpkg

This commit is contained in:
xushiwei
2025-05-03 23:30:29 +08:00
parent e93e7126b6
commit 3ac9055493
4 changed files with 231 additions and 4 deletions

View File

@@ -25,9 +25,9 @@ const (
DefaultFlags = IndexAutoUpdate | ToolQuietInstall
)
// Main is the main entry point for the cppkg package.
// Install installs a package with the given name and version.
// pkgAndVer: 7bitcoder/7bitconf@1.2.0
func Main(pkgAndVer string, flags int) {
func Install(pkgAndVer string, flags int) {
pkgPath, ver := parsePkgVer(pkgAndVer)
if ver == "" {
panic("TODO: get latest version")