Skip to content

Commit

Permalink
remove ioutil call
Browse files Browse the repository at this point in the history
- fix goreleaser yaml file
- add goreleaser to flake shell
  • Loading branch information
qbit committed May 5, 2024
1 parent 3f4b81f commit e54bb53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
11 changes: 0 additions & 11 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 8 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
};
});
};
Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/csv"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit e54bb53

Please sign in to comment.