Skip to content

Commit

Permalink
fix(candevice): add empty device struct for non-linux
Browse files Browse the repository at this point in the history
Fixes the following for non-linux host when running make:

```
[go-lint]
pkg/candevice/device_others.go:10:22: undeclared name: `Device` (typecheck)
func New(_ string) (*Device, error) {
^
[go-lint] exit status 1
[go-review] exit status 1
```
  • Loading branch information
saimanwong committed Jan 10, 2023
1 parent 2e3d37e commit 07df397
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/candevice/device_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"runtime"
)

type Device struct{}

func New(_ string) (*Device, error) {
return nil, fmt.Errorf("candevice is not supported on OS %s and runtime %s", runtime.GOOS, runtime.Version())
}

0 comments on commit 07df397

Please sign in to comment.