{"id":28540699,"url":"https://github.com/leecade/vgo_example","last_synced_at":"2026-01-29T13:50:59.269Z","repository":{"id":66295388,"uuid":"122918928","full_name":"leecade/vgo_example","owner":"leecade","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-26T06:21:01.000Z","size":854,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T11:41:19.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"AMPL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leecade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-26T05:40:03.000Z","updated_at":"2018-02-26T06:21:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"095dd4d5-af54-4791-b632-806e308d767f","html_url":"https://github.com/leecade/vgo_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leecade/vgo_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecade%2Fvgo_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecade%2Fvgo_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecade%2Fvgo_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecade%2Fvgo_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leecade","download_url":"https://codeload.github.com/leecade/vgo_example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecade%2Fvgo_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28878907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T19:37:04.603Z","updated_at":"2026-01-29T13:50:59.236Z","avatar_url":"https://github.com/leecade.png","language":"AMPL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 版本要求\n\ngo1.10+\n\n## 安装\n\n```sh\n$ go get -u golang.org/x/vgo\n```\n\n## 常用命令\n\n```sh\n$ vgo list -m  # 查看所有依赖\n$ vgo list -m -u  # 查看所有依赖同时检查更新，会打印出最新版本和当前版本\n$ vgo test all  # 执行所有测试，包括依赖包的测试\n$ vgo test http://rsc.io/sampler  # 执行指定包测试\n$ vgo get -u  # 更新所有依赖\n$ vgo list -t http://rsc.io/sampler  # 检查指定包所有可用的版本 即tag\n$ vgo get http://rsc.io/sampler@v1.3.1  # 获取指定版本，并修改go.mod\n$ vgo vendor  # 退到vendor 兼容不使用vgo的用户\n...\n```\n\n## 使用\n\n根目录创建 `go.mod` 标示项目根目录, 终结了 `GOPATH` 作为 Go 代码工作空间的设置, `go.mod` 文件包含了完整的模块路径并且定义了每个使用的依赖的版本, 因此包含 `go.mod` 文件的目录就可以被认为是一个目录树的根目录了, 该目录树作用于自身的工作空间，并且和其他类似的目录彼此隔离\n\n```sh\n$ touch go.mod\n```\n\n\n```\n# 用 `// import` 注释 vgo 模块的 \"导入路径名称\"\npackage main // import \"github.com/you/hello\"\n```\n\n执行 `vgo build` 后自动生成依赖关系到 `go.mod`\n\n```\nmodule \"github.com/leecade/vgo_example\"\n\nrequire \"rsc.io/quote\" v1.5.2\n```\n\n`go.mod` 文件包含了模块所依赖包的最小版本. 如果模块没有提供一个tag版本, 对于未命名的提交, `v0.0.0-yyyymmddhhmmss-commit` 表示一个指定日期的提交.\n\n`go.mod` 文件还可以实现排除和替换的版本, 需手动修改go.mod文件:\n\n```\nexclude \"rsc.io/sampler\" v1.99.99\n\nreplace \"rsc.io/quote\" v1.5.2 =\u003e \"../quote\"\n```\n\n## 问题\n\n- github api 超限\n\n    ```\n    import \"rsc.io/quote\": unexpected status (https://api.github.com/repos/rsc/quote): 401 Unauthorized\n    ```\n\n    在 github \"Settings \u003e Developer settings \u003e Personal access tokens \u003e Generate new token\" 创建新 token, 更新到 `~/.netrc`\n\n    ```\n    machine api.github.com\n        login ACCOUNT\n        password TOKEN\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleecade%2Fvgo_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleecade%2Fvgo_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleecade%2Fvgo_example/lists"}