Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aq17 committed Apr 14, 2023
1 parent 908f3d2 commit 0107705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion upgrade/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func AutoAliasingMigration(resourcesFilePath, providerName string) error {
if err != nil {
return err
}
s := string(buf.Bytes())
s := buf.String()
s = strings.Replace(s, `EMBED_COMMENT_ANCHOR "embed"`,
"// embed is used to store bridge-metadata.json in the compiled binary\n _ \"embed\"", 1)
s = strings.Replace(s, `var metadata []byte // EMBED_DIRECTIVE_ANCHOR`,
Expand Down
5 changes: 2 additions & 3 deletions upgrade/migrations_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package upgrade

import (
"io/ioutil"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -66,7 +65,7 @@ func Provider() tfbridge.ProviderInfo {
err = AutoAliasingMigration(origPath, "test")
assert.Nil(t, err)

modified, err := ioutil.ReadFile(origPath)
modified, err := os.ReadFile(origPath)
assert.Nil(t, err)

expected := `package test
Expand Down Expand Up @@ -128,6 +127,6 @@ var metadata []byte
err = AutoAliasingMigration(origPath, "test")
assert.Nil(t, err)

modified2, err := ioutil.ReadFile(origPath)
modified2, err := os.ReadFile(origPath)
assert.Equal(t, string(modified2), expected)
}

0 comments on commit 0107705

Please sign in to comment.