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 - darwin
ldflags: ldflags:
- -s -w -X main.build={{.Version}} - -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: signs:
- artifacts: checksum - artifacts: checksum
source: source:

View File

@ -42,7 +42,14 @@
nix flake run github:qbit/xin#flake-warn nix flake run github:qbit/xin#flake-warn
echo "Go `${pkgs.go}/bin/go version`" 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" "encoding/csv"
"flag" "flag"
"fmt" "fmt"
"io/ioutil"
"log" "log"
"net" "net"
"net/http" "net/http"
@ -152,7 +151,7 @@ func createEmpty(path string) error {
if os.IsNotExist(fErr) { if os.IsNotExist(fErr) {
log.Printf("creating %q\n", path) log.Printf("creating %q\n", path)
twData, _ := tiddly.ReadFile(twFile) twData, _ := tiddly.ReadFile(twFile)
wErr := ioutil.WriteFile(path, twData, 0600) wErr := os.WriteFile(path, twData, 0600)
if wErr != nil { if wErr != nil {
return wErr return wErr
} }