From 8c49fe63327e1f08c399553d5882be203669f13c Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Sun, 14 Dec 2014 16:07:10 +0100 Subject: [PATCH] Reorganized repository --- serial/Makefile => Makefile | 2 +- serial/serial.go => serial.go | 0 serial/native_linux.go => serial_linux.go | 0 serial/native_windows.go => serial_windows.go | 0 serial/native_zwindows.go => syscall_windows.go | 0 test.go => test/serial_test.go | 6 +++--- 6 files changed, 4 insertions(+), 4 deletions(-) rename serial/Makefile => Makefile (65%) rename serial/serial.go => serial.go (100%) rename serial/native_linux.go => serial_linux.go (100%) rename serial/native_windows.go => serial_windows.go (100%) rename serial/native_zwindows.go => syscall_windows.go (100%) rename test.go => test/serial_test.go (91%) 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)