Skip to content

Commit

Permalink
update for lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ddl-retornam committed Jun 28, 2023
1 parent 8899fe7 commit b2b476f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ linters:
- goerr113
- gofumpt
- golint
- goconst
- gomnd
- gomoddirectives
- ifshort
Expand Down
13 changes: 5 additions & 8 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/samber/lo"
"gopkg.in/yaml.v3"

)

type Controller struct {
Expand All @@ -26,7 +25,7 @@ type Controller struct {

func (c Controller) Validate() error {
var errs []string
var compression = []BuildkitCompression{CompressionGzip,
var compression = []BuildkitCompression{CompressionGzip,
CompressionStargz, CompressionZstd}

if c.ImageBuildMaxConcurrency < 1 {
Expand Down Expand Up @@ -99,16 +98,14 @@ type Manager struct {
// Buildkit compression values
type BuildkitCompression string


const (
CompressionGzip BuildkitCompression = "gzip"
CompressionGzip BuildkitCompression = "gzip"
CompressionStargz BuildkitCompression = "stargz"
CompressionZstd BuildkitCompression = "zstd"
CompressionZstd BuildkitCompression = "zstd"
)

var CompressionMethod BuildkitCompression


// Buildkit communication and discovery configuration.
type Buildkit struct {
// Namespace where the StatefulSet is deployed.
Expand All @@ -135,8 +132,8 @@ type Buildkit struct {
Registries map[string]RegistryConfig `json:"registries,omitempty" yaml:"registries,omitempty"`
// FetchAndExtractTimeout used when processing the remote Docker context tarball.
// Fetch retries have a hard timeout limit of 4.25 mins because, come on, don't be ridiculous.
FetchAndExtractTimeout time.Duration `json:"fetchAndExtractTimeout" yaml:"fetchAndExtractTimeout"`
Compression BuildkitCompression `json:"compression" yaml:"compression" default:"gzip"`
FetchAndExtractTimeout time.Duration `json:"fetchAndExtractTimeout" yaml:"fetchAndExtractTimeout"`
Compression BuildkitCompression `json:"compression" yaml:"compression" default:"gzip"`
}

// RegistryConfig options used to relax registry push/pull restrictions.
Expand Down

0 comments on commit b2b476f

Please sign in to comment.