remove ioutil call

- fix goreleaser yaml file
- add goreleaser to flake shell
This commit is contained in:
Aaron Bieber 2024-05-05 13:40:33 -06:00
parent 3f4b81fb81
commit e54bb537f6
No known key found for this signature in database
3 changed files with 9 additions and 14 deletions

View File

@ -32,17 +32,6 @@ builds:
- darwin
ldflags:
- -s -w -X main.build={{.Version}}
archives:
- replacements:
openbsd: OpenBSD
freebsd: FreeBSD
netbsd: NetBSD
dragonfly: DragonflyBSD
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
signs:
- artifacts: checksum
source:

View File

@ -42,7 +42,14 @@
nix flake run github:qbit/xin#flake-warn
echo "Go `${pkgs.go}/bin/go version`"
'';
nativeBuildInputs = with pkgs; [ git go gopls go-tools nilaway ];
nativeBuildInputs = with pkgs; [
git
go
gopls
goreleaser
go-tools
nilaway
];
};
});
};

View File

@ -6,7 +6,6 @@ import (
"encoding/csv"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
@ -152,7 +151,7 @@ func createEmpty(path string) error {
if os.IsNotExist(fErr) {
log.Printf("creating %q\n", path)
twData, _ := tiddly.ReadFile(twFile)
wErr := ioutil.WriteFile(path, twData, 0600)
wErr := os.WriteFile(path, twData, 0600)
if wErr != nil {
return wErr
}