remove ioutil call
- fix goreleaser yaml file - add goreleaser to flake shell
This commit is contained in:
parent
3f4b81fb81
commit
e54bb537f6
@ -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:
|
||||||
|
@ -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
|
||||||
|
];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
3
main.go
3
main.go
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user