Skip to content

Commit

Permalink
Merge pull request #23089 from megubyte/lint/v001/worklink
Browse files Browse the repository at this point in the history
service/worklink: tech debt: fix V001 linter errors
  • Loading branch information
gdavison authored Feb 10, 2022
2 parents cc22059 + eecad82 commit f45acbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
12 changes: 8 additions & 4 deletions internal/service/worklink/fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package worklink
import (
"fmt"
"log"
"regexp"
"strings"
"time"

Expand Down Expand Up @@ -33,10 +34,13 @@ func ResourceFleet() *schema.Resource {
Computed: true,
},
"name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validFleetName,
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.All(
validation.StringMatch(regexp.MustCompile(`^[a-z0-9](?:[a-z0-9\-]{0,46}[a-z0-9])?$`), "must contain only alphanumeric characters"),
validation.StringLenBetween(1, 48),
),
},
"display_name": {
Type: schema.TypeString,
Expand Down
21 changes: 0 additions & 21 deletions internal/service/worklink/validate.go

This file was deleted.

0 comments on commit f45acbb

Please sign in to comment.