backups: add more info, keep 1 of each version opt

backup's filename format has changed, and includes the commit too now. a
Backup struct for going to/from the filename has been added, and the
option "keep 1 backup from each version" has been added, leaving the
most recent backup from each version always. All pre-this-commit backups
are considered the same "old" version.
This commit is contained in:
Harvey Tindall
2025-05-13 15:07:55 +01:00
parent 0b9206012f
commit d6f5c91d78
15 changed files with 248 additions and 50 deletions

12
go.mod
View File

@@ -1,6 +1,8 @@
module github.com/hrfee/jfa-go
go 1.22.0
go 1.23.0
toolchain go1.24.0
replace github.com/hrfee/jfa-go/docs => ./docs
@@ -131,12 +133,12 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/image v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/net v0.36.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
)