Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
flux2
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
fluxcd
flux2
Commits
45526108
Commit
45526108
authored
3 years ago
by
WONG, Wing Kam
Browse files
Options
Downloads
Patches
Plain Diff
Remove use of deprecated io/ioutil
Signed-off-by:
WONG, Wing Kam
<
wingkwong.code@gmail.com
>
parent
414c0bbb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/azure/util_test.go
+2
-3
2 additions, 3 deletions
tests/azure/util_test.go
with
2 additions
and
3 deletions
tests/azure/util_test.go
+
2
−
3
View file @
45526108
...
@@ -19,7 +19,6 @@ package test
...
@@ -19,7 +19,6 @@ package test
import
(
import
(
"context"
"context"
"fmt"
"fmt"
"io/ioutil"
"os"
"os"
"os/exec"
"os/exec"
"path/filepath"
"path/filepath"
...
@@ -49,7 +48,7 @@ const defaultBranch = "main"
...
@@ -49,7 +48,7 @@ const defaultBranch = "main"
// getKubernetesCredentials returns a path to a kubeconfig file and a kube client instance.
// getKubernetesCredentials returns a path to a kubeconfig file and a kube client instance.
func
getKubernetesCredentials
(
kubeconfig
,
aksHost
,
aksCert
,
aksKey
,
aksCa
string
)
(
string
,
client
.
Client
,
error
)
{
func
getKubernetesCredentials
(
kubeconfig
,
aksHost
,
aksCert
,
aksKey
,
aksCa
string
)
(
string
,
client
.
Client
,
error
)
{
tmpDir
,
err
:=
ioutil
.
Temp
Dir
(
""
,
"*-azure-e2e"
)
tmpDir
,
err
:=
os
.
Mkdir
Temp
(
""
,
"*-azure-e2e"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
nil
,
err
return
""
,
nil
,
err
}
}
...
@@ -309,7 +308,7 @@ func getRepository(url, branchName string, overrideBranch bool, password string)
...
@@ -309,7 +308,7 @@ func getRepository(url, branchName string, overrideBranch bool, password string)
checkoutBranch
=
branchName
checkoutBranch
=
branchName
}
}
tmpDir
,
err
:=
ioutil
.
Temp
Dir
(
""
,
"*-repository"
)
tmpDir
,
err
:=
os
.
Mkdir
Temp
(
""
,
"*-repository"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
""
,
err
return
nil
,
""
,
err
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment