You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rString:=fmt.Sprintf("%s", acctest.RandString(5))// nolint // TODO: Resolve this golangci-lint issue: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
errorMessageExpected.WriteString(fmt.Sprintf("%s=%v, ", attr, projectResource[fmt.Sprintf("%s", attr)]))// nolint // TODO: Resolve this golangci-lint issue: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
rString:=fmt.Sprintf("%s", acctest.RandString(5))// nolint // TODO: Resolve this golangci-lint issue: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
switche.(type) {// nolint // TODO: Resolve this golangci-lint issue: S1034: assigning the result of this type assertion to a variable (switch e := e.(type)) could eliminate type assertions in switch cases (gosimple)
18
18
case*schema.Set:
19
-
if!e.(*schema.Set).Equal(r) {
19
+
if!e.(*schema.Set).Equal(r) {// nolint // TODO: Resolve this golangci-lint issue: S1034(related information): could eliminate this type assertion (gosimple)
20
20
returnfmt.Errorf(`attribute set %s expected "%+v" received "%+v"`, attr, e, r)
client.UserAgent=httpclient.TerraformUserAgent(p.TerraformVersion) +" terraform-provider-gitlab"// nolint // TODO: Resolve this golangci-lint issue: SA1019: httpclient.TerraformUserAgent is deprecated: This will be removed in v2 without replacement. If you need its functionality, you can copy it or reference the v1 package. (staticcheck)
Copy file name to clipboardExpand all lines: gitlab/resource_gitlab_group_ldap_link.go
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ func resourceGitlabGroupLdapLinkCreate(d *schema.ResourceData, meta interface{})
71
71
}
72
72
73
73
ifforce {
74
-
resourceGitlabGroupLdapLinkDelete(d, meta)
74
+
resourceGitlabGroupLdapLinkDelete(d, meta)// nolint // TODO: Resolve this golangci-lint issue: Error return value is not checked (errcheck)
75
75
}
76
76
77
77
log.Printf("[DEBUG] Create GitLab group LdapLink %s", d.Id())
@@ -95,9 +95,9 @@ func resourceGitlabGroupLdapLinkRead(d *schema.ResourceData, meta interface{}) e
95
95
iferr!=nil {
96
96
// The read/GET API wasn't implemented in GitLab until version 12.8 (March 2020, well after the add and delete APIs).
97
97
// If we 404, assume GitLab is at an older version and take things on faith.
98
-
switcherr.(type) {
98
+
switcherr.(type) {// nolint // TODO: Resolve this golangci-lint issue: S1034: assigning the result of this type assertion to a variable (switch err := err.(type)) could eliminate type assertions in switch cases (gosimple)
iferr.(*gitlab.ErrorResponse).Response.StatusCode==404 {// nolint // TODO: Resolve this golangci-lint issue: S1034(related information): could eliminate this type assertion (gosimple)
101
101
log.Printf("[WARNING] This GitLab instance doesn't have the GET API for group_ldap_sync. Please upgrade to 12.8 or later for best results.")
102
102
} else {
103
103
returnerr
@@ -124,7 +124,7 @@ func resourceGitlabGroupLdapLinkRead(d *schema.ResourceData, meta interface{}) e
124
124
125
125
if!found {
126
126
d.SetId("")
127
-
returnerrors.New(fmt.Sprintf("LdapLink %s does not exist.", d.Id()))
127
+
returnerrors.New(fmt.Sprintf("LdapLink %s does not exist.", d.Id()))// nolint // TODO: Resolve this golangci-lint issue: S1028: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (gosimple)
128
128
}
129
129
}
130
130
@@ -140,10 +140,10 @@ func resourceGitlabGroupLdapLinkDelete(d *schema.ResourceData, meta interface{})
140
140
log.Printf("[DEBUG] Delete GitLab group LdapLink %s", d.Id())
switcherr.(type) {// nolint // TODO: Resolve this golangci-lint issue: S1034: assigning the result of this type assertion to a variable (switch err := err.(type)) could eliminate type assertions in switch cases (gosimple)
144
144
case*gitlab.ErrorResponse:
145
145
// Ignore LDAP links that don't exist
146
-
ifstrings.Contains(string(err.(*gitlab.ErrorResponse).Message), "Linked LDAP group not found") {
146
+
ifstrings.Contains(string(err.(*gitlab.ErrorResponse).Message), "Linked LDAP group not found") {// nolint // TODO: Resolve this golangci-lint issue: S1034(related information): could eliminate this type assertion (gosimple)
0 commit comments