diff --git a/enumerator_unsupported_unix.go b/enumerator_unsupported_unix.go new file mode 100644 index 0000000..2d908e1 --- /dev/null +++ b/enumerator_unsupported_unix.go @@ -0,0 +1,17 @@ +// +// Copyright 2014-2024 Cristian Maglie. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// + +//go:build !linux && !darwin && !freebsd && !openbsd + +package serial + +import ( + "errors" +) + +func nativeGetPortsList() ([]string, error) { + return nil, errors.New("nativeGetPortsList is not currently supported on this OS") +} diff --git a/serial_unsupported_unix.go b/serial_unsupported_unix.go new file mode 100644 index 0000000..ffdfc6c --- /dev/null +++ b/serial_unsupported_unix.go @@ -0,0 +1,17 @@ +// +// Copyright 2014-2024 Cristian Maglie. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// + +//go:build !linux && !darwin && !freebsd && !openbsd + +package serial + +import ( + "errors" +) + +func nativeOpen(portName string, mode *Mode) (Port, error) { + return nil, errors.New("nativeOpen is not currently supported on this OS") +}