bump to golang 1.21

This commit is contained in:
Louis Abel 2024-06-10 14:02:55 -07:00
parent 66ee4b488c
commit 7c1d85b963
Signed by: label
GPG Key ID: 3331F061D1D9990E
2 changed files with 5 additions and 3 deletions

4
go.mod
View File

@ -1,6 +1,8 @@
module github.com/rocky-linux/srpmproc
go 1.18
go 1.21
toolchain go1.21.8
require (
cloud.google.com/go/storage v1.12.0

View File

@ -55,7 +55,7 @@ func patch(cfg *srpmprocpb.Cfg, pd *data.ProcessData, _ *data.ModeData, patchTre
return errors.New(fmt.Sprintf("COULD_NOT_OPEN_PATCH_SUBJECT:%s", srcPath))
}
err = gitdiff.NewApplier(patchSubjectFile).ApplyFile(&output, patchedFile)
err = gitdiff.Apply(&output, patchSubjectFile, patchedFile)
if err != nil {
pd.Log.Printf("could not apply patch: %v", err)
return errors.New(fmt.Sprintf("COULD_NOT_APPLY_PATCH_WITH_SUBJECT:%s", srcPath))
@ -74,7 +74,7 @@ func patch(cfg *srpmprocpb.Cfg, pd *data.ProcessData, _ *data.ModeData, patchTre
if err != nil {
return errors.New(fmt.Sprintf("COULD_NOT_CREATE_NEW_FILE:%s", srcPath))
}
err = gitdiff.NewApplier(newFile).ApplyFile(&output, patchedFile)
err = gitdiff.Apply(&output, newFile, patchedFile)
if err != nil {
return errors.New(fmt.Sprintf("COULD_NOT_APPLY_PATCH_TO_NEW_FILE:%s", srcPath))
}