Skip to content

Commit

Permalink
Dropped support for Go 1.8
Browse files Browse the repository at this point in the history
Fixed a deprecation warning
  • Loading branch information
Dids committed Nov 4, 2018
1 parent 0984a5f commit b6a155e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ matrix:
- go: 1.9.x
env:
- TEST_COMMAND="echo \"Tests disabled for this version of Go\""
- go: 1.8.x
env:
- TEST_COMMAND="echo \"Tests disabled for this version of Go\""
# NOTE: Clobber is no longer compatible with version 1.8.x
#- go: 1.8.x
# env:
# - TEST_COMMAND="echo \"Tests disabled for this version of Go\""

# Setup caching
cache:
Expand Down
9 changes: 7 additions & 2 deletions patches/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ func Patch(packedPatches packr.Box, patchName string, fileToPatch string) error
return fileErr
}

// Load the patch
patch, patchErr := packedPatches.FindString(patchName + ".patch")
if patchErr != nil {
return patchErr
}

// Write the patch contents to the temporary file
// if _, writeErr := file.WriteString(packedPatches.String("buildpkg.patch")); writeErr != nil {
if _, writeErr := file.WriteString(packedPatches.String(patchName + ".patch")); writeErr != nil {
if _, writeErr := file.WriteString(patch); writeErr != nil {
os.Remove(tempFilePath)
return writeErr
}
Expand Down

0 comments on commit b6a155e

Please sign in to comment.