{"id":26826738,"url":"https://github.com/hslam/msg","last_synced_at":"2025-04-28T17:01:34.887Z","repository":{"id":144227365,"uuid":"316471162","full_name":"hslam/msg","owner":"hslam","description":"Package msg provides a way to use System V message queues.","archived":false,"fork":false,"pushed_at":"2021-01-16T18:48:11.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T11:32:46.836Z","etag":null,"topics":["go","golang","ipc","message-queue","msg","msgget","system-v","unix"],"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/hslam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2020-11-27T10:32:25.000Z","updated_at":"2023-10-22T08:34:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"94226c4a-d241-4b63-bcd1-ffe1ee3d3f5d","html_url":"https://github.com/hslam/msg","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fmsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fmsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fmsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fmsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hslam","download_url":"https://codeload.github.com/hslam/msg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251352232,"owners_count":21575858,"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":["go","golang","ipc","message-queue","msg","msgget","system-v","unix"],"created_at":"2025-03-30T11:30:50.119Z","updated_at":"2025-04-28T17:01:34.790Z","avatar_url":"https://github.com/hslam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# msg\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/hslam/msg)](https://pkg.go.dev/github.com/hslam/msg)\n[![Build Status](https://github.com/hslam/msg/workflows/build/badge.svg)](https://github.com/hslam/msg/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hslam/msg)](https://goreportcard.com/report/github.com/hslam/msg)\n[![LICENSE](https://img.shields.io/github/license/hslam/msg.svg?style=flat-square)](https://github.com/hslam/msg/blob/master/LICENSE)\n\nPackage msg provides a way to use System V message queues.\n\n## Get started\n\n### Install\n```\ngo get github.com/hslam/msg\n```\n### Import\n```\nimport \"github.com/hslam/msg\"\n```\n### Usage\n#### Example\n**msgsnd**\n```go\npackage main\n\nimport (\n\t\"github.com/hslam/ftok\"\n\t\"github.com/hslam/msg\"\n\t\"time\"\n)\n\nfunc main() {\n\tkey, err := ftok.Ftok(\"/tmp\", 0x22)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tmsgid, err := msg.Get(key, msg.IPC_CREAT|0600)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer msg.Remove(msgid)\n\terr = msg.Send(msgid, 1, []byte(\"Hello World\"), 0600)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\ttime.Sleep(time.Second * 10)\n}\n```\n**msgrcv**\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/hslam/ftok\"\n\t\"github.com/hslam/msg\"\n)\n\nfunc main() {\n\tkey, err := ftok.Ftok(\"/tmp\", 0x22)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tmsgid, err := msg.Get(key, 0600)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\ttext, err := msg.Receive(msgid, 1, 0600)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(string(text))\n}\n```\n\n#### Output\n```\nHello World\n```\n\n### License\nThis package is licensed under a MIT license (Copyright (c) 2020 Meng Huang)\n\n\n### Author\nmsg was written by Meng Huang.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhslam%2Fmsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhslam%2Fmsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhslam%2Fmsg/lists"}