Skip to content

Commit

Permalink
bump to golang 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Jun 10, 2024
1 parent 66ee4b4 commit 7c1d85b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/directives/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
}
Expand Down

0 comments on commit 7c1d85b

Please sign in to comment.