3 Commits

Author SHA1 Message Date
e87a194267 ci: add GitHub Actions test workflow 2026-02-23 18:07:29 +00:00
2b1116d920 refactor: remove unused const and var to pass staticcheck
- Remove unused 'killed' const in util.go
- Remove unused 'command' var in examples/injection/main.go
2026-02-23 18:07:29 +00:00
2a47181ccf chore(deps): update Go 1.16->1.26, update google/shlex 2026-02-23 18:07:29 +00:00
4 changed files with 18 additions and 10 deletions

17
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Test
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go test -race ./...
- run: go vet ./...
- run: go build ./...

View File

@@ -7,13 +7,6 @@ import (
"github.com/taigrr/adb"
)
var command string
func init() {
// TODO allow for any input to be used as the command
command = "ls"
}
func main() {
ctx := context.TODO()
devs, err := adb.Devices(ctx)

2
go.mod
View File

@@ -1,5 +1,5 @@
module github.com/taigrr/adb
go 1.16
go 1.26.0
require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510

View File

@@ -10,8 +10,6 @@ import (
var adb string
const killed = 130
func init() {
path, err := exec.LookPath("adb")
if err != nil {