summaryrefslogtreecommitdiff
path: root/data/datasource_git.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2022-08-04 19:52:09 -0400
committerDave Henderson <dhenderson@gmail.com>2022-08-04 19:54:51 -0400
commitf67ce5ac8d8bc3f47563dd6512946d8947cf412a (patch)
tree4697b947e9d6eeec1479c29cdd661ced2dd5effb /data/datasource_git.go
parentf13bcfdd78e0e502947addb3b3f0556bbbf9edf5 (diff)
Fix lint errors
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data/datasource_git.go')
-rw-r--r--data/datasource_git.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/data/datasource_git.go b/data/datasource_git.go
index c2673dd3..c5291413 100644
--- a/data/datasource_git.go
+++ b/data/datasource_git.go
@@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/url"
"os"
"path"
@@ -136,7 +136,7 @@ func (g gitsource) parseGitPath(u *url.URL, args ...string) (out *url.URL, p str
return out, p, err
}
-//nolint: interfacer
+// nolint: interfacer
func cloneURL(u *url.URL) *url.URL {
out, _ := url.Parse(u.String())
return out
@@ -263,7 +263,7 @@ func (g gitsource) read(fs billy.Filesystem, path string) (string, []byte, error
return "", nil, fmt.Errorf("can't open %s: %w", path, err)
}
- b, err := ioutil.ReadAll(f)
+ b, err := io.ReadAll(f)
if err != nil {
return "", nil, fmt.Errorf("can't read %s: %w", path, err)
}
@@ -294,7 +294,8 @@ func (g gitsource) readDir(fs billy.Filesystem, path string) ([]byte, error) {
/*
auth methods:
- ssh named key (no password support)
- - GIT_SSH_KEY (base64-encoded) or GIT_SSH_KEY_FILE (base64-encoded, or not)
+ - GIT_SSH_KEY (base64-encoded) or GIT_SSH_KEY_FILE (base64-encoded, or not)
+
- ssh agent auth (preferred)
- http basic auth (for github, gitlab, bitbucket tokens)
- http token auth (bearer token, somewhat unusual)