Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 4831cdd

Browse files
committed
Don't use Go 1.16 features
1 parent 32fef57 commit 4831cdd

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

internals/secrethub/migrate_config_envfile.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package secrethub
33
import (
44
"bytes"
55
"fmt"
6+
"io/ioutil"
67
"os"
78
"regexp"
89

@@ -29,7 +30,7 @@ func (cmd *MigrateConfigEnvfileCommand) Run() error {
2930
filepath = "secrethub.env"
3031
}
3132

32-
inFileContents, err := os.ReadFile(filepath)
33+
inFileContents, err := ioutil.ReadFile(filepath)
3334
if err != nil {
3435
return ErrReadFile(filepath, err)
3536
}

internals/secrethub/migrate_config_references.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package secrethub
33
import (
44
"fmt"
55
"io/ioutil"
6-
"os"
76
"regexp"
87
"strings"
98

@@ -61,7 +60,7 @@ func migrateReferences(inFile string, outFile string, mapping referenceMapping)
6160
return nil, fmt.Errorf("no 1Password equivalent present in your migration plan for the following secrets:\n- %s", strings.Join(misses, "\n- "))
6261
}
6362

64-
err = os.WriteFile(outFile, []byte(output), 0666)
63+
err = ioutil.WriteFile(outFile, []byte(output), 0666)
6564
if err != nil {
6665
return nil, err
6766
}

internals/secrethub/migrate_config_templates.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package secrethub
33
import (
44
"fmt"
55
"io"
6+
"io/ioutil"
67
"os"
78
"regexp"
89
"strings"
@@ -48,7 +49,7 @@ func (cmd *MigrateConfigTemplatesCommand) Run() error {
4849
}
4950

5051
func migrateTemplateTags(inFile io.Reader, outFile io.Writer, mapping referenceMapping, formatString string) ([]string, error) {
51-
raw, err := io.ReadAll(inFile)
52+
raw, err := ioutil.ReadAll(inFile)
5253
if err != nil {
5354
return nil, ErrReadFile(inFile, err)
5455
}

0 commit comments

Comments
 (0)