diff --git a/.gitignore b/.gitignore index cc65dce..5fc5eda 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -src -bin +/src +/bin +/pkg +/gowebdav diff --git a/Makefile b/Makefile index ba359b6..91add2b 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,17 @@ -SRC := $(wildcard *.go) main/client.go -BIN := bin -CLIENT := ${BIN}/client +BIN := gowebdav +SRC := $(wildcard *.go) cmd/gowebdav/main.go -all: test client +all: test cmd -client: ${CLIENT} +cmd: ${BIN} -${CLIENT}: ${SRC} - @echo build $@ - go build -o $@ -- main/client.go +${BIN}: ${SRC} + go build -o $@ ./cmd/gowebdav test: - go test + go test ./... clean: - @echo clean ${BIN} - @rm -f ${BIN}/* + @rm -f ${BIN} -.PHONY: all client clean +.PHONY: all cmd clean test diff --git a/main/client.go b/cmd/gowebdav/main.go similarity index 98% rename from main/client.go rename to cmd/gowebdav/main.go index a4d475f..042921a 100644 --- a/main/client.go +++ b/cmd/gowebdav/main.go @@ -14,7 +14,7 @@ func fail(err interface{}) { if err != nil { fmt.Println(err) } else { - fmt.Println("Usage: client FLAGS ARGS") + fmt.Println("Usage: gowebdav FLAGS ARGS") fmt.Println("Flags:") flag.PrintDefaults() fmt.Println("Method ")