{"id":19061970,"url":"https://github.com/citilinkru/libudev","last_synced_at":"2026-02-03T20:17:46.423Z","repository":{"id":57537779,"uuid":"123474773","full_name":"citilinkru/libudev","owner":"citilinkru","description":"Golang native implementation udev library","archived":false,"fork":false,"pushed_at":"2020-07-25T18:51:49.000Z","size":29,"stargazers_count":47,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-18T20:18:14.801Z","etag":null,"topics":["go","golang","library","libudev","native","udev","uevent"],"latest_commit_sha":null,"homepage":null,"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/citilinkru.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}},"created_at":"2018-03-01T18:18:21.000Z","updated_at":"2024-06-07T11:35:26.000Z","dependencies_parsed_at":"2022-09-04T14:01:19.687Z","dependency_job_id":null,"html_url":"https://github.com/citilinkru/libudev","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citilinkru%2Flibudev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citilinkru%2Flibudev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citilinkru%2Flibudev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citilinkru%2Flibudev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citilinkru","download_url":"https://codeload.github.com/citilinkru/libudev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223770452,"owners_count":17199685,"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","library","libudev","native","udev","uevent"],"created_at":"2024-11-09T00:23:59.116Z","updated_at":"2026-02-03T20:17:46.384Z","avatar_url":"https://github.com/citilinkru.png","language":"Go","funding_links":[],"categories":["systemd-udev"],"sub_categories":[],"readme":"# libudev\nGolang native implementation Udev library\n\n[![Build Status](https://travis-ci.org/citilinkru/libudev.svg?branch=master)](https://travis-ci.org/citilinkru/libudev)\n[![Coverage Status](https://coveralls.io/repos/github/citilinkru/libudev/badge.svg?branch=master)](https://coveralls.io/github/citilinkru/libudev?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/citilinkru/libudev)](https://goreportcard.com/report/github.com/citilinkru/libudev)\n[![GoDoc](https://godoc.org/github.com/citilinkru/libudev?status.svg)](https://godoc.org/github.com/citilinkru/libudev)\n[![GitHub release](https://img.shields.io/github/release/citilinkru/libudev.svg)](https://github.com/citilinkru/libudev/releases)\n\n\nInstallation\n------------\n    go get github.com/citilinkru/libudev\n\nUsage\n-----\n\n### Scanning devices\n```go\nsc := libudev.NewScanner()\nerr, devices := s.ScanDevices()\n```\n\n### Filtering devices\n```go\nm := matcher.NewMatcher()\nm.SetStrategy(matcher.StrategyOr)\nm.AddRule(matcher.NewRuleAttr(\"dev\", \"189:133\"))\nm.AddRule(matcher.NewRuleEnv(\"DEVNAME\", \"usb/lp0\"))\n\nfilteredDevices := m.Match(devices)\n```\n\n### Getting parent device\n```go\nif device.Parent != nil {\n    fmt.Printf(\"%s\\n\", device.Parent.Devpath)\n}\n```\n\n### Getting children devices\n```go\nfmt.Printf(\"Count children devices %d\\n\", len(device.Children))\n```\n\nFeatures\n--------\n* 100% Native code\n* Without external dependencies\n* Code is covered by tests\n\nRequirements\n------------\n\n* Need at least `go1.13` or newer.\n\nDocumentation\n-------------\n\nYou can read package documentation [here](http:godoc.org/github.com/citilinkru/libudev) or read tests.\n\nTesting\n-------\nUnit-tests:\n```bash\ngo test -race -v ./...\n```\n\nContributing\n------------\n* Fork\n* Write code\n* Run unit test: `go test -v ./...`\n* Run go vet: `go vet -v ./...`\n* Run go fmt: `go fmt ./...`\n* Commit changes\n* Create pull-request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitilinkru%2Flibudev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitilinkru%2Flibudev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitilinkru%2Flibudev/lists"}