Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor: fix some lint warnings (#569)

Danny Xu3673e433fe96
diff --git a/plugin/vcs/gitlab/gitlab.go b/plugin/vcs/gitlab/gitlab.go
index 22cd47ab76..d1a34da285 100644
--- a/plugin/vcs/gitlab/gitlab.go
+++ b/plugin/vcs/gitlab/gitlab.go
@@ -248,7 +248,7 @@ func (provider *Provider) OverwriteFile(ctx context.Context, oauthCtx common.Oau
return nil
}
-// ReadFileMeta reads the content of a file.
+// ReadFile reads the content of a file.
func (provider *Provider) ReadFile(ctx context.Context, oauthCtx common.OauthContext, instanceURL string, repositoryID string, filePath string, commitID string) (string, error) {
code, body, err := httpGet(
instanceURL,
diff --git a/plugin/vcs/util.go b/plugin/vcs/util.go
index 1a703d7cd6..6fd1592c80 100644
--- a/plugin/vcs/util.go
+++ b/plugin/vcs/util.go
@@ -5,6 +5,7 @@ import (
"strings"
)
+// Branch is the helper function returns the branch name from reference name.
// For now, this method only supports branch reference.
// https://git-scm.com/book/en/v2/Git-Internals-Git-References
func Branch(ref string) (string, error) {
diff --git a/plugin/vcs/vcs.go b/plugin/vcs/vcs.go
index b701fcf84b..2df5444808 100644
--- a/plugin/vcs/vcs.go
+++ b/plugin/vcs/vcs.go
@@ -64,10 +64,13 @@ type PushEvent struct {
FileCommit FileCommit `json:"fileCommit"`
}
+// UserState is the state of a VCS user account.
type UserState string
const (
- UserStateActive UserState = "active"
+ // UserStateActive is the active state for VCS user state.
+ UserStateActive UserState = "active"
+ // UserStateArchived is the archived state for VCS user state.
UserStateArchived UserState = "archived"
)
@@ -78,6 +81,7 @@ type UserInfo struct {
State UserState `json:"state"`
}
+// Provider is the interface for VCS provider.
type Provider interface {
// Returns the API URL for a given VCS instance URL
APIURL(instanceURL string) string