diff --git a/serial/Makefile b/Makefile similarity index 65% rename from serial/Makefile rename to Makefile index d8329b2..95c56db 100644 --- a/serial/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ include $(GOROOT)/src/Make.inc TARG=github.com/bugst/go-serial/serial -GOFILES=serial.go native_$(GOOS).go native_z$(GOOS).go +GOFILES=serial.go native_$(GOOS).go syscall_$(GOOS).go include $(GOROOT)/src/Make.pkg diff --git a/serial/serial.go b/serial.go similarity index 100% rename from serial/serial.go rename to serial.go diff --git a/serial/native_linux.go b/serial_linux.go similarity index 100% rename from serial/native_linux.go rename to serial_linux.go diff --git a/serial/native_windows.go b/serial_windows.go similarity index 100% rename from serial/native_windows.go rename to serial_windows.go diff --git a/serial/native_zwindows.go b/syscall_windows.go similarity index 100% rename from serial/native_zwindows.go rename to syscall_windows.go diff --git a/test.go b/test/serial_test.go similarity index 91% rename from test.go rename to test/serial_test.go index a5bfbe6..59ee481 100644 --- a/test.go +++ b/test/serial_test.go @@ -1,10 +1,10 @@ -package main +package serial -import "bug.st/go-serial/serial" +import "go.bug.st/serial" import "fmt" import "log" -func main() { +func ExampleCommunication() { ports, err := serial.GetPortsList() if err != nil { log.Fatal(err)