{"id":17481590,"url":"https://github.com/lorenzosaino/go-sysctl","last_synced_at":"2025-04-10T05:02:29.507Z","repository":{"id":32582026,"uuid":"127482109","full_name":"lorenzosaino/go-sysctl","owner":"lorenzosaino","description":"Go wrapper around the sysctl interface","archived":false,"fork":false,"pushed_at":"2023-04-09T17:06:21.000Z","size":1700,"stargazers_count":54,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T01:11:12.403Z","etag":null,"topics":["go","golang","sysctl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzosaino.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-03-30T23:32:05.000Z","updated_at":"2025-02-13T18:34:27.000Z","dependencies_parsed_at":"2024-06-18T15:23:05.400Z","dependency_job_id":"d0543b0b-2a64-4c79-91cc-6a5726ab969c","html_url":"https://github.com/lorenzosaino/go-sysctl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-sysctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-sysctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-sysctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-sysctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzosaino","download_url":"https://codeload.github.com/lorenzosaino/go-sysctl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161270,"owners_count":21057554,"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","sysctl"],"created_at":"2024-10-18T22:23:24.596Z","updated_at":"2025-04-10T05:02:29.449Z","avatar_url":"https://github.com/lorenzosaino.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Sysctl\n\n[![GoDoc](https://img.shields.io/static/v1?label=godoc\u0026message=reference\u0026color=blue)](https://pkg.go.dev/github.com/lorenzosaino/go-sysctl)\n[![Build](https://github.com/lorenzosaino/go-sysctl/workflows/Build/badge.svg)](https://github.com/lorenzosaino/go-sysctl/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lorenzosaino/go-sysctl)](https://goreportcard.com/report/github.com/lorenzosaino/go-sysctl)\n[![License](https://img.shields.io/github/license/lorenzosaino/go-sysctl.svg)](https://github.com/lorenzosaino/go-sysctl/blob/master/LICENSE)\n\nGo wrapper around the sysctl interface.\n\n## Documentation\n\nSee [Go doc](https://pkg.go.dev/github.com/lorenzosaino/go-sysctl?tab=doc).\n\n## Usage\n\n```go\nimport sysctl \"github.com/lorenzosaino/go-sysctl\"\n\nvar (\n    val string\n    vals map[string]string\n    err error\n)\n\n// Get value of a single sysctl\n// This is equivalent to running \"sysctl \u003ckey\u003e\"\nval, err = sysctl.Get(\"net.ipv4.ip_forward\")\n\n// Get the values of all sysctls matching a given pattern\n// This is equivalent to running \"sysctl -a -r \u003cpattern\u003e\"\nvals, err = sysctl.GetPattern(\"net.ipv4.ipfrag\")\n\n// Get the values of all sysctls\n// This is equivalent to running \"sysctl -a\"\nvals, err = sysctl.GetAll()\n\n// Set the value of a sysctl\n// This is equivalent to running \"sysctl -w \u003ckey\u003e=\u003cvalue\u003e\"\nerr = sysctl.Set(\"net.ipv4.ip_forward\", \"1\")\n\n// Set sysctl values from configuration file\n// This is equivalent to running \"sysctl -p \u003cconfig-file\u003e\"\nerr = sysctl.LoadConfigAndApply(\"/etc/sysctl.conf\")\n```\n\n## License\n\n[BSD 3-clause](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzosaino%2Fgo-sysctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzosaino%2Fgo-sysctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzosaino%2Fgo-sysctl/lists"}