{"id":27135548,"url":"https://github.com/huhouhua/go-nuget","last_synced_at":"2026-04-30T14:36:21.533Z","repository":{"id":286649224,"uuid":"961980655","full_name":"huhouhua/go-nuget","owner":"huhouhua","description":"NuGet Go SDK","archived":false,"fork":false,"pushed_at":"2025-04-07T17:33:45.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T17:34:46.912Z","etag":null,"topics":["api-client","client","golang","nuget"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huhouhua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2025-04-07T13:20:07.000Z","updated_at":"2025-04-07T17:33:48.000Z","dependencies_parsed_at":"2025-04-07T17:35:38.554Z","dependency_job_id":"d85d3e68-5242-4c22-b2d0-1ce39777974b","html_url":"https://github.com/huhouhua/go-nuget","commit_stats":null,"previous_names":["huhouhua/go-nuget"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fgo-nuget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fgo-nuget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fgo-nuget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fgo-nuget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huhouhua","download_url":"https://codeload.github.com/huhouhua/go-nuget/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761028,"owners_count":20991533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api-client","client","golang","nuget"],"created_at":"2025-04-08T01:48:36.285Z","updated_at":"2026-04-30T14:36:21.527Z","avatar_url":"https://github.com/huhouhua.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t   \u003ca href=\"https://pkg.go.dev/github.com/huhouhua/go-nuget\" \u003e \n\t\u003cimg src=\"https://raw.githubusercontent.com/huhouhua/go-nuget/main/docs/img/go-nuget.png\"\n\t     alt=\"go-nuget\"\n    \t     width=\"170\"\u003e\n     \u003c/a\u003e\n\t\u003ch4 align=\"center\"\u003e\n\t\teasy golang nuget client module\n\t\u003c/h4\u003e\n\t\u003cp\u003eGo-NuGet is a NuGet API v3 client written in Golang, enabling Golang programs to interact with NuGet repositories in a simple and unified way!\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"#-installation-and-documentation\"\u003eInstallation\u003c/a\u003e ❘\n\t\u003ca href=\"#-coverage\"\u003eCoverage\u003c/a\u003e ❘\n\t\u003ca href=\"#-usage\"\u003eUsage\u003c/a\u003e ❘\n\t\u003ca href=\"#-examples\"\u003eExamples\u003c/a\u003e ❘\n\t\u003ca href=\"#-license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n![Workflow ci](https://github.com/huhouhua/go-nuget/actions/workflows/go.yml/badge.svg)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/huhouhua/go-nuget/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release-pre/huhouhua/go-nuget.svg)](https://github.com/huhouhua/go-nuget/releases)\n[![GoDoc](https://godoc.org/github.com/huhouhua/go-nuget?status.svg)](https://godoc.org/github.com/huhouhua/go-nuget)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/huhouhua/go-nuget?logo=go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/huhouhua/go-nuget)](https://goreportcard.com/report/github.com/huhouhua/go-nuget)\n[![Test Coverage](https://codecov.io/gh/huhouhua/go-nuget/branch/main/graph/badge.svg)](https://codecov.io/gh/huhouhua/go-nuget)\n\n\n## 🤘\u0026nbsp; Coverage\n\nThis API client package covers the NuGet API v3 endpoints and is updated regularly\nto add new and/or missing endpoints. Currently, the following services are supported:\n\n- [x] Service Resources\n- [x] Package Search\n- [x] Package Metadata\n- [x] Package Publish\n- [x] Package Delete\n- [x] Package Download\n- [x] Package Version\n- [x] Package Read\n- [x] Package Create\n- [x] Package Dependencies\n- [x] Package Source Configuration\n- [x] Package Source Authentication\n\n## 🚀\u0026nbsp; Installation and Documentation\n\nWhen used with Go modules, use the following import path:\n```shell\ngo get github.com/huhouhua/go-nuget\n```\nYou can find the docs at [go docs](https://pkg.go.dev/github.com/huhouhua/go-nuget).\n\n## 📄\u0026nbsp; Usage\nConstruct a new NuGet client, then use the various methods on the client to\naccess different parts of the NuGet API. For example, to get the service resources:\n\n```go\nclient, err := nuget.NewClient()\nif err != nil {\n    panic(fmt.Sprintf(\"Failed to create client: %v\", err))\n}\n// Get request resource\nindex, _, err := client.IndexResource.GetIndex()\nif err != nil {\n    log.Fatalf(\"Failed to get resources: %v\", err)\n}\n\n// print the resources url\nfor _, r := range index.Resources {\n    fmt.Printf(\"url: %s\", r.Id)\n}\n```\n\nThere are a few `With...` option functions that can be used to customize\nthe API client. For example, to set a custom source URL:\n\n```go\nclient, err := nuget.NewClient(\n    nuget.WithSourceURL(\"https://your-private-feed.com/v3/index.json\"),\n    nuget.WithRetryMax(5),\n    nuget.WithRetryWaitMinMax(time.Second*1, time.Second*10),\n)\nif err != nil {\n    panic(fmt.Sprintf(\"Failed to create client: %v\", err))\n}\n```\n\n## 🥙\u0026nbsp; Examples\n\nThe [examples](examples/) directory contains a couple of clear examples, of which one is partially listed here as well:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/huhouhua/go-nuget\"\n\t\"log\"\n\t\"time\"\n)\n\nfunc main() {\n\t// Create a new NuGet client with custom retry settings\n\tclient, err := nuget.NewClient(\n\t\tnuget.WithSourceURL(\"https://your-private-feed.com/v3/index.json\"),\n\t\tnuget.WithRetryMax(5),\n\t\tnuget.WithRetryWaitMinMax(time.Second*1, time.Second*10),\n\t)\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"Failed to create client: %v\", err))\n\t}\n\n\t// Get all versions of a package\n\tversions, _, err := client.FindPackageResource.ListAllVersions(\"MyPackage\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get package versions: %v\", err)\n\t}\n\t// print the versions\n\tfor _, v := range versions {\n\t\tfmt.Printf(\"Found version %s\", v.OriginalVersion)\n\t}\n}\n\n```\n\nFor complete usage of go-nuget, see the full [package docs](https://godoc.org/github.com/huhouhua/go-nuget).\n\n##  Full Examples\n\n### Full Examples : API Resources Operations\n* [index.go](https://github.com/huhouhua/go-nuget/blob/main/examples/index.go)\n\n### Full Examples : Package Find Operations\n* [listversions.go](https://github.com/huhouhua/go-nuget/blob/main/examples/listversions.go)\n* [getdependency.go](https://github.com/huhouhua/go-nuget/blob/main/examples/getdependency.go)\n* [copynupkgtostream.go](https://github.com/huhouhua/go-nuget/blob/main/examples/copynupkgtostream.go)\n\n### Full Examples : Package Read and Create Operations\n* [readpackage.go](https://github.com/huhouhua/go-nuget/blob/main/examples/readpackage.go)\n* [createpackage.go](https://github.com/huhouhua/go-nuget/blob/main/examples/createpackage.go)\n\n### Full Examples : Package Search Operations\n* [search.go](https://github.com/huhouhua/go-nuget/blob/main/examples/search.go)\n\n### Full Examples : Package Metadata Operations\n* [getmetadata.go](https://github.com/huhouhua/go-nuget/blob/main/examples/getmetadata.go)\n* [listmetadata.go](https://github.com/huhouhua/go-nuget/blob/main/examples/listmetadata.go)\n\n### Full Examples : Package Push Operations\n* [pushpackage.go](https://github.com/huhouhua/go-nuget/blob/main/examples/pushpackage.go)\n* [pushwithstream.go](https://github.com/huhouhua/go-nuget/blob/main/examples/pushwithstream.go)\n* [deletepackage.go](https://github.com/huhouhua/go-nuget/blob/main/examples/deletepackage.go)\n\n## 🤝\u0026nbsp;Issues\n\nIf you have an issue: report it on the [issue tracker](https://github.com/huhouhua/go-nuget/issues)\n\n## 👤\u0026nbsp;Author\n\nKevin Berger (\u003chuhouhuam@gmail.com\u003e)\n\n## 🧑‍💻\u0026nbsp;Contributing\n\nContributions are always welcome. For more information, check out the [contributing guide](CONTRIBUTING.md)\n\n## 📘\u0026nbsp; License\n\nLicensed under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuhouhua%2Fgo-nuget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuhouhua%2Fgo-nuget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuhouhua%2Fgo-nuget/lists"}