feat: add goreleaser

This commit is contained in:
Simon Ding
2024-09-29 14:27:01 +08:00
parent ce25c090f5
commit 5d726dbcf1
25 changed files with 2192 additions and 48 deletions

View File

@@ -13,7 +13,6 @@ import (
"github.com/pkg/errors"
"golang.org/x/crypto/bcrypt"
"golang.org/x/exp/rand"
"golang.org/x/sys/unix"
)
func IsASCII(s string) bool {
@@ -131,13 +130,6 @@ func SeasonId(seasonName string) (int, error) {
return num, nil
}
func AvailableSpace(dir string) uint64 {
var stat unix.Statfs_t
unix.Statfs(dir, &stat)
return stat.Bavail * uint64(stat.Bsize)
}
func ChangeFileHash(name string) error {
f, err := os.OpenFile(name, os.O_APPEND|os.O_WRONLY, 0655)
if err != nil {