linter appeasement

This commit is contained in:
vilmibm 2020-11-20 11:00:25 -08:00
parent f68909b7a8
commit 1d408eb30d
2 changed files with 2 additions and 8 deletions

View file

@ -9,13 +9,6 @@ import (
"github.com/cli/cli/pkg/iostreams"
)
func dumpPath(random int64) string {
r := fmt.Sprintf("%x", random)
r = r[len(r)-5:]
dumpFilename := fmt.Sprintf("gh%s.json", r)
return filepath.Join(os.TempDir(), dumpFilename)
}
func PreserveInput(io *iostreams.IOStreams, state *IssueMetadataState, createErr *error) func() {
return func() {
if !state.IsDirty() {

View file

@ -101,7 +101,8 @@ func Test_PreserveInput(t *testing.T) {
PreserveInput(io, tt.state, &err)()
tf.Seek(0, 0)
_, err = tf.Seek(0, 0)
assert.NoError(t, err)
data, err := ioutil.ReadAll(tf)
assert.NoError(t, err)