Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>
Update make file to handle cleaning and correct import packages
.gitignore | 1 + Makefile | 15 +++++++++++---- src/models/models.go | 6 ++++++
diff --git a/.gitignore b/.gitignore index 36f971e324f3e948a5289e81d36eb4dbbacb887e..9daabd4c290e7e932ac0aad316da53373fbe757a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ bin/* +.go diff --git a/Makefile b/Makefile index 38025da8b27e7bcb8f0175d25e2fab9718716c6d..30b5309ac41d3c8d479f517cb0dbf7b8440dcf8c 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,15 @@ -PKGNAME = t - +PKGNAME = git.sr.ht/~porcellis/t GOPATH = $(realpath .go) +PKGPATH = .go/src/$(PKGNAME) all: t -t: - env go build -o bin/$(PKGNAME) src/main.go +.go: + mkdir -p $(dir $(PKGPATH)) + ln -fTrs $(realpath .) $(PKGPATH) + +t: .go + env GOPATH=$(GOPATH) go build -o $@ ./src/main.go + +clean: + rm -rf .go t diff --git a/src/models/models.go b/src/models/models.go new file mode 100644 index 0000000000000000000000000000000000000000..9c2938a6c1188c7a50cddf81a86748e490995e4e --- /dev/null +++ b/src/models/models.go @@ -0,0 +1,6 @@ +package models + +type Note struct { + Name string + Path string +}