{"id":76421,"library":"nats-io-nats","title":"NATS Go Client","description":"A Go client for the NATS messaging system.","status":"active","version":"1.52.0","language":"go","source_language":null,"source_url":"https://github.com/nats-io/nats","tags":["nats","messaging","pubsub","client"],"install":[{"cmd":"go get github.com/nats-io/nats","lang":"bash","label":"Install github.com/nats-io/nats"}],"dependencies":[],"imports":[{"symbol":"nats","correct":"github.com/nats-io/nats"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/nats-io/nats\"\n)\n\nfunc main() {\n\tnc, _ := nats.Connect(nats.DefaultURL)\n\tdefer nc.Close()\n\n\tnc.Subscribe(\"foo\", func(m *nats.Msg) {\n\t\tfmt.Printf(\"Received: %s\\n\", string(m.Data))\n\t})\n\n\tnc.Publish(\"foo\", []byte(\"Hello NATS!\"))\n\tselect {}\n}","lang":"go","description":"Connects to NATS, subscribes to a subject, and publishes a message."},"warnings":[{"fix":"Use v2 (github.com/nats-io/nats/v2) for new projects.","message":"Breaking changes between v1 and v2; v2 uses a different API.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'client':3,6,15 'go':2,5 'messag':10,13 'nat':1,9,12 'pubsub':14 'system':11","created_at":"2026-06-17T19:30:35.293834+00:00","updated_at":"2026-06-17T19:30:35.293834+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/nats-io/nats","github":"https://github.com/nats-io/nats","docs":"https://pkg.go.dev/github.com/nats-io/nats#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}