Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Migrate to Go modules #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.py[co]
getioctl
_obj
/.devcontainer
11 changes: 3 additions & 8 deletions example_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package evdev_test

import (
. "evdev"
"fmt"

. "github.com/gvalkov/golang-evdev"
)

func ExampleOpen() {
Expand All @@ -12,7 +13,7 @@ func ExampleOpen() {

// Listing accessible input devices.
func ExampleListInputDevices() {
devices, _ := evdev.ListInputDevices()
devices, _ := ListInputDevices()

for _, dev := range devices {
fmt.Printf("%s %s %s", dev.Fn, dev.Name, dev.Phys)
Expand All @@ -34,10 +35,4 @@ func Example() {
// 0:[0 1 2 4]
// 2:[0 1 6 8 272 273 274 275 276 277 278 279]
// 1:[272 273 274 275 276 277 278 279] ]

fmt.Println(device.ResolveCapabilities())
// map[ 4:[4 272 273 274 275 276 277 278 279]
// 0:[0 1 2 4]
// 2:[0 1 6 8 272 273 274 275 276 277 278 279]
// 1:[272 273 274 275 276 277 278 279] ]
}
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/gvalkov/golang-evdev

go 1.14