rebase 12/02, use go1.16rc1 in make, remove ioutil, start switching to io/fs for file i/o

ioutil's contents are now in io and os.
Eventually jfa-go's files will be embedded in the binary with go1.16's
new embed feature. Using io/fs will provide abstraction for accessing
these files, and allow for both embedded and non-embedded versions.
Also, internal paths to things like email templates, etc. will be
prefixed with "jfa-go:" to indicate to use the app's own Filesystem
instead of reading the file normally. This also allows for custom files
to continue to be used as they are currently.
This commit is contained in:
Harvey Tindall
2021-01-31 23:12:50 +00:00
parent 1af8d1f77d
commit fefe2d82a4
10 changed files with 170 additions and 144 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ ts-debug:
cp -r ts build/data/web/js
swagger:
go get github.com/swaggo/swag/cmd/swag
go1.16rc1 get github.com/swaggo/swag/cmd/swag
swag init -g main.go
version:
@@ -51,10 +51,10 @@ version:
compile:
$(info Downloading deps)
go mod download
go1.16rc1 mod download
$(info Building)
mkdir -p build
CGO_ENABLED=0 go build -o build/jfa-go *.go
CGO_ENABLED=0 go1.16rc1 build -o build/jfa-go *.go
compress:
upx --lzma build/jfa-go