Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable stylecheck linter #2505

Merged
merged 89 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
41261a0
Enable gocyclo linter
ankitjain235 Aug 3, 2023
118bc8a
Enable gocritic linter
ankitjain235 Aug 3, 2023
9fe8ef0
Fix typo for linters-settings, fix gocyclo lint failures
ankitjain235 Aug 3, 2023
88f1097
Add lll linter
ankitjain235 Aug 3, 2023
cf599c9
Add nakedret linter
ankitjain235 Aug 3, 2023
4c91b50
Enable dupl linter
ankitjain235 Aug 3, 2023
54d1d5e
Enable exportloopref linter
ankitjain235 Aug 3, 2023
ad04108
Enable importas linter
ankitjain235 Aug 3, 2023
953121f
Enable misspell linter
ankitjain235 Aug 3, 2023
605f039
Enable nestif linter
ankitjain235 Aug 3, 2023
31e838f
Fix minor typo
ankitjain235 Aug 7, 2023
b4cf462
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
2f1bbe4
Update new lint misses, add TODO for lint disables
ankitjain235 Oct 3, 2023
ef78a07
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
62b8959
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
41933d9
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
9c3b9a1
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
44a39cb
Fix misspell lint failure
ankitjain235 Oct 3, 2023
a874943
Merge master, resolve conflicts
ankitjain235 Nov 29, 2023
612154b
Apply linter to new changes
ankitjain235 Nov 29, 2023
0007316
Merge master, resolve conflicts
ankitjain235 Nov 29, 2023
7a3945a
Fix merge issues
ankitjain235 Nov 29, 2023
75b4f9d
Merge parent, resolve conflicts
ankitjain235 Nov 29, 2023
bc30421
Merge parent, resolve conflicts
ankitjain235 Nov 29, 2023
d0392d6
Enable gci linter
ankitjain235 Nov 29, 2023
3524aba
Enable goprintffuncname and nolintlint linters
ankitjain235 Nov 30, 2023
7d10e44
Enable stylecheck linter
ankitjain235 Nov 30, 2023
b8ad05f
Skip stylechecks with minimal change requirements
ankitjain235 Dec 1, 2023
f267cfd
Remove comment
ankitjain235 Dec 1, 2023
6695929
Merge master, resolve conflicts
ankitjain235 Dec 4, 2023
8c38dc0
Merge branch 'enable-linters-2' into enable-linters-3
ankitjain235 Dec 4, 2023
d522754
Add missing newlint
ankitjain235 Dec 4, 2023
32f0cae
Merge parent, resolve conflicts
ankitjain235 Dec 4, 2023
d9c9116
Merge parent, resolve conflicts
ankitjain235 Dec 4, 2023
1a5d695
Merge parent, resolve conflicts
ankitjain235 Dec 4, 2023
0ca4c20
Unexport local function
ankitjain235 Dec 4, 2023
fded60e
Add explanation for ignoring dupl linter
ankitjain235 Dec 4, 2023
3f68dab
Merge branch 'enable-linters-2' into enable-linters-3
ankitjain235 Dec 4, 2023
08e0240
Merge branch 'enable-linters-3' into enable-linters-4
ankitjain235 Dec 4, 2023
e30c1ce
Remove unnecessary comment
ankitjain235 Dec 4, 2023
21d4de0
Merge branch 'enable-linters-4' into enable-linters-5
ankitjain235 Dec 4, 2023
d425db5
Merge branch 'enable-linters-5' into enable-linters-6
ankitjain235 Dec 4, 2023
5b6234c
Merge branch 'master' into enable-linters-2
ankitjain235 Dec 6, 2023
5e97339
Address review comments
ankitjain235 Dec 18, 2023
da05972
Address review comments - move args
ankitjain235 Dec 19, 2023
a8795b2
Merge branch 'master' into enable-linters-2
ankitjain235 Dec 19, 2023
95d4b08
Merge parent, resolve conflicts
ankitjain235 Dec 19, 2023
7e7f3bf
Merge parent, resolve conflicts
ankitjain235 Dec 19, 2023
446c437
Temporarily disable depguard linter, lint fix
ankitjain235 Dec 19, 2023
8727b06
Merge branch 'enable-linters-2' into enable-linters-3
ankitjain235 Dec 19, 2023
a435fdf
Merge branch 'enable-linters-3' into enable-linters-4
ankitjain235 Dec 19, 2023
74180ac
Fix merge error
ankitjain235 Dec 19, 2023
4ab2e48
Merge parent, resolve conflicts
ankitjain235 Dec 19, 2023
ad4ff12
Merge parent, resolve conflicts
ankitjain235 Dec 19, 2023
7c84f68
Merge master, resolve conflicts
ankitjain235 Dec 21, 2023
d059a7f
Fix lint failure
ankitjain235 Dec 21, 2023
919627a
Merge branch 'enable-linters-5' into enable-linters-6
ankitjain235 Dec 21, 2023
52af19c
Fix lint failure
ankitjain235 Dec 21, 2023
36aa8b0
merge conflict resolved
saima-s May 23, 2024
e9d46c7
removed non deleted file and sync with master
saima-s May 23, 2024
25bec02
run linter fix command
saima-s May 23, 2024
f51525c
reverted the generated file change acc to master
saima-s May 23, 2024
6989300
merge conflict resolved
saima-s May 23, 2024
c7f953b
removed some nolint and addressed review comments
saima-s May 24, 2024
ca27e69
addressed review comment
saima-s May 24, 2024
217e307
Merge branch 'master' of github.com:kanisterio/kanister into enable-l…
saima-s Jun 5, 2024
d0e82c8
Merge branch 'master' of github.com:kanisterio/kanister into enable-l…
saima-s Jun 6, 2024
d19d6ce
fix err check and gci linter
saima-s Jun 20, 2024
d744221
merge conflict resolved
saima-s Jun 21, 2024
1e3a653
disabled stylecheck ST1000 and fix review comment
saima-s Jun 21, 2024
a39e2d2
run go mod tidy
saima-s Jun 21, 2024
57b1f33
fix nolintlint error
saima-s Jun 21, 2024
9cfbeee
fix space issue
saima-s Jun 21, 2024
fae52fc
merge conflict resolved
saima-s Jul 2, 2024
23551f2
enabled default linter
saima-s Jul 5, 2024
12134dc
Merge branch 'master' into enable-linters-5
saima-s Jul 5, 2024
55bcb92
Merge branch 'enable-linters-5' of github.com:kanisterio/kanister int…
saima-s Jul 5, 2024
712f628
enabled default linter
saima-s Jul 5, 2024
7571875
fix lint
saima-s Jul 9, 2024
7e1e43d
Merge branch 'enable-linters-5' of github.com:kanisterio/kanister int…
saima-s Jul 9, 2024
80d001e
fix unparam linter
saima-s Jul 9, 2024
d01f0db
merge conflict resolved
saima-s Jul 12, 2024
d9012c0
fix review comment
saima-s Jul 12, 2024
3634b86
fix review comment of nolint
saima-s Jul 12, 2024
f95cefa
fix linter issue
saima-s Jul 12, 2024
208794a
fix review comment
saima-s Jul 12, 2024
c8d6ec6
Update pkg/testing/integration_register.go
saima-s Jul 26, 2024
ebe1089
Merge branch 'master' into enable-linters-6
saima-s Jul 26, 2024
0aa55bc
Merge branch 'master' into enable-linters-6
mergify[bot] Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ linters:
- importas
- misspell
- nestif
- gci
- goprintffuncname
- nolintlint
- stylecheck

run:
timeout: 10m # golangci-lint run's timeout.
Expand All @@ -41,6 +45,7 @@ issues:
- dupl
- misspell
- nestif
- stylecheck

- text: "`ctx` is unused" # Context might not be in use in places, but for consistency, we pass it.
linters:
Expand All @@ -66,3 +71,10 @@ linters-settings:
alias: crv1alpha1
nestif:
min-complexity: 6
gci:
sections:
- standard
- default
- prefix(github.com/kanisterio/kanister)
stylecheck:
checks: [ "all", "-ST1001", "-ST1005", "-ST1016", "-ST1023" ]
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ builds:
main: cmd/kanctl/main.go
ldflags: &ldflags
- -extldflags "-static"
-X github.com/kanisterio/kanister/pkg/version.VERSION={{.Version}}
-X github.com/kanisterio/kanister/pkg/version.GIT_COMMIT={{.Commit}}
-X github.com/kanisterio/kanister/pkg/version.BUILD_DATE={{.Date}}
-X github.com/kanisterio/kanister/pkg/version.Version={{.Version}}
-X github.com/kanisterio/kanister/pkg/version.GitCommit={{.Commit}}
-X github.com/kanisterio/kanister/pkg/version.BuildDate={{.Date}}
env: &env
- GO111MODULE=on
- CGO_ENABLED=1
Expand Down
1 change: 0 additions & 1 deletion cmd/reposervercontroller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import (
"github.com/kanisterio/kanister/pkg/log"
"github.com/kanisterio/kanister/pkg/resource"
"github.com/kanisterio/kanister/pkg/validatingwebhook"
//+kubebuilder:scaffold:imports
)

var (
Expand Down
3 changes: 2 additions & 1 deletion pkg/app/bp.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ import (
"strings"
"time"

"k8s.io/apimachinery/pkg/util/rand"

crv1alpha1 "github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1"
bp "github.com/kanisterio/kanister/pkg/blueprint"
"github.com/kanisterio/kanister/pkg/field"
"github.com/kanisterio/kanister/pkg/log"
"k8s.io/apimachinery/pkg/util/rand"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions pkg/app/cockroachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ func (c *CockroachDB) IsReady(ctx context.Context) (bool, error) {
return false, errors.Wrapf(err, "Error while Creating ca.crt %s", stderr)
}

createTlsCrtCmd := fmt.Sprintf("echo '%s'>> /cockroach/cockroach-client-certs/client.root.crt", c.tlscrt)
createTlsCrt := []string{"sh", "-c", createTlsCrtCmd}
_, stderr, err = c.execCommand(ctx, createTlsCrt)
createTLSCrtCmd := fmt.Sprintf("echo '%s'>> /cockroach/cockroach-client-certs/client.root.crt", c.tlscrt)
createTLSCrt := []string{"sh", "-c", createTLSCrtCmd}
_, stderr, err = c.execCommand(ctx, createTLSCrt)
if err != nil {
return false, errors.Wrapf(err, "Error while Creating tls.crt %s", stderr)
}

createTlsKeyCmd := fmt.Sprintf("echo '%s' >> /cockroach/cockroach-client-certs/client.root.key", c.tlskey)
createTlsKey := []string{"sh", "-c", createTlsKeyCmd}
_, stderr, err = c.execCommand(ctx, createTlsKey)
createTLSKeyCmd := fmt.Sprintf("echo '%s' >> /cockroach/cockroach-client-certs/client.root.key", c.tlskey)
createTLSKey := []string{"sh", "-c", createTLSKeyCmd}
_, stderr, err = c.execCommand(ctx, createTLSKey)
if err != nil {
return false, errors.Wrapf(err, "Error while Creating tls.key %s", stderr)
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/app/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ import (
"fmt"
"os"

"github.com/kanisterio/kanister/pkg/aws/ec2"
"github.com/kanisterio/kanister/pkg/aws/rds"
"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/rand"

"github.com/kanisterio/kanister/pkg/aws/ec2"
"github.com/kanisterio/kanister/pkg/aws/rds"
)

const (
Expand Down
16 changes: 8 additions & 8 deletions pkg/aws/ec2/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ func (e EC2) DescribeSecurityGroup(ctx context.Context, groupName string) (*ec2.
return e.DescribeSecurityGroupsWithContext(ctx, sgi)
}

func (e EC2) CreateSecurityGroup(ctx context.Context, groupName, description, vpcId string) (*ec2.CreateSecurityGroupOutput, error) {
func (e EC2) CreateSecurityGroup(ctx context.Context, groupName, description, vpcID string) (*ec2.CreateSecurityGroupOutput, error) {
sgi := &ec2.CreateSecurityGroupInput{
DryRun: &e.DryRun,
Description: &description,
GroupName: &groupName,
VpcId: aws.String(vpcId),
VpcId: aws.String(vpcID),
}
return e.CreateSecurityGroupWithContext(ctx, sgi)
}

func (e EC2) AuthorizeSecurityGroupIngress(ctx context.Context, groupId, cidr, protocol string, port int64) (*ec2.AuthorizeSecurityGroupIngressOutput, error) {
func (e EC2) AuthorizeSecurityGroupIngress(ctx context.Context, groupID, cidr, protocol string, port int64) (*ec2.AuthorizeSecurityGroupIngressOutput, error) {
sgi := &ec2.AuthorizeSecurityGroupIngressInput{
DryRun: &e.DryRun,
GroupId: &groupId,
GroupId: &groupID,
CidrIp: &cidr,
IpProtocol: &protocol,
ToPort: &port,
Expand All @@ -72,20 +72,20 @@ func (e EC2) AuthorizeSecurityGroupIngress(ctx context.Context, groupId, cidr, p
return e.AuthorizeSecurityGroupIngressWithContext(ctx, sgi)
}

func (e EC2) DeleteSecurityGroup(ctx context.Context, groupId string) (*ec2.DeleteSecurityGroupOutput, error) {
func (e EC2) DeleteSecurityGroup(ctx context.Context, groupID string) (*ec2.DeleteSecurityGroupOutput, error) {
sgi := &ec2.DeleteSecurityGroupInput{
DryRun: &e.DryRun,
GroupId: aws.String(groupId),
GroupId: aws.String(groupID),
}
return e.DeleteSecurityGroupWithContext(ctx, sgi)
}

func (e EC2) DescribeSubnets(ctx context.Context, vpcId string) (*ec2.DescribeSubnetsOutput, error) {
func (e EC2) DescribeSubnets(ctx context.Context, vpcID string) (*ec2.DescribeSubnetsOutput, error) {
paramsEC2 := &ec2.DescribeSubnetsInput{
Filters: []*ec2.Filter{
{
Name: aws.String("vpc-id"),
Values: []*string{aws.String(vpcId)},
Values: []*string{aws.String(vpcID)},
},
},
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/aws/rds/rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/rds"
"github.com/kanisterio/kanister/pkg/poll"
"github.com/pkg/errors"

"github.com/kanisterio/kanister/pkg/poll"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/blockstorage/awsebs/awsebs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ import (
. "gopkg.in/check.v1"

kaws "github.com/kanisterio/kanister/pkg/aws"
envconfig "github.com/kanisterio/kanister/pkg/config"

"github.com/kanisterio/kanister/pkg/blockstorage"
envconfig "github.com/kanisterio/kanister/pkg/config"
)

// Hook up gocheck into the "go test" runner.
Expand Down
33 changes: 15 additions & 18 deletions pkg/blockstorage/azure/azuredisk.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// TODO: Switch to using the latest azure sdk and remove nolint.
// Related Ticket- https://github.com/kanisterio/kanister/issues/1684
//
//nolint:staticcheck

package azure

import (
Expand Down Expand Up @@ -74,11 +71,11 @@ func (s *AdStorage) VolumeGet(ctx context.Context, id string, zone string) (*blo

func (s *AdStorage) VolumeCreate(ctx context.Context, volume blockstorage.Volume) (*blockstorage.Volume, error) {
tags := blockstorage.SanitizeTags(blockstorage.KeyValueToMap(volume.Tags))
diskId, err := uuid.NewV1()
diskID, err := uuid.NewV1()
if err != nil {
return nil, errors.Wrap(err, "Failed to create UUID")
}
diskName := fmt.Sprintf(volumeNameFmt, diskId.String())
diskName := fmt.Sprintf(volumeNameFmt, diskID.String())

diskProperties := &armcompute.DiskProperties{
CreationData: &armcompute.CreationData{
Expand Down Expand Up @@ -195,11 +192,11 @@ func (s *AdStorage) SnapshotCopyWithArgs(ctx context.Context, from blockstorage.
if err != nil {
return nil, errors.Wrapf(err, "Failed to copy disk to blob")
}
snapId, err := uuid.NewV1()
snapID, err := uuid.NewV1()
if err != nil {
return nil, errors.Wrap(err, "Failed to create UUID")
}
snapName := fmt.Sprintf(snapshotNameFmt, snapId.String())
snapName := fmt.Sprintf(snapshotNameFmt, snapID.String())
createSnap := getSnapshotObject(blob, from, to, snapName, storageAccountID)

migrateResourceGroup := s.azCli.ResourceGroup
Expand Down Expand Up @@ -295,11 +292,11 @@ func deleteBlob(blob *storage.Blob, blobName string) {
}

func (s *AdStorage) SnapshotCreate(ctx context.Context, volume blockstorage.Volume, tags map[string]string) (*blockstorage.Snapshot, error) {
snapId, err := uuid.NewV1()
snapID, err := uuid.NewV1()
if err != nil {
return nil, errors.Wrap(err, "Failed to create UUID")
}
snapName := fmt.Sprintf(snapshotNameFmt, snapId.String())
snapName := fmt.Sprintf(snapshotNameFmt, snapID.String())
tags = blockstorage.SanitizeTags(ktags.GetTags(tags))
region, _, err := getLocationInfo(volume.Az)
if err != nil {
Expand Down Expand Up @@ -423,9 +420,9 @@ func (s *AdStorage) VolumeParse(ctx context.Context, volume interface{}) (*block
return nil, errors.New("Volume type is not available")
}

volId := ""
volID := ""
if vol.ID != nil {
volId = blockstorage.StringFromPtr(vol.ID)
volID = blockstorage.StringFromPtr(vol.ID)
} else {
return nil, errors.New("Volume Id is not available")
}
Expand All @@ -447,7 +444,7 @@ func (s *AdStorage) VolumeParse(ctx context.Context, volume interface{}) (*block

return &blockstorage.Volume{
Type: s.Type(),
ID: volId,
ID: volID,
Encrypted: encrypted,
SizeInBytes: diskSize,
Az: az,
Expand All @@ -466,15 +463,15 @@ func (s *AdStorage) SnapshotParse(ctx context.Context, snapshot interface{}) (*b
}

func (s *AdStorage) snapshotParse(ctx context.Context, snap armcompute.Snapshot) (*blockstorage.Snapshot, error) {
snapId := ""
snapID := ""
if snap.ID != nil {
snapId = *snap.ID
snapID = *snap.ID
} else {
return nil, errors.New("Snapshot ID is missing")
}
vol := &blockstorage.Volume{
Type: s.Type(),
ID: snapId,
ID: snapID,
}

snapCreationTime := time.Now()
Expand Down Expand Up @@ -504,7 +501,7 @@ func (s *AdStorage) snapshotParse(ctx context.Context, snap armcompute.Snapshot)
}
return &blockstorage.Snapshot{
Encrypted: encrypted,
ID: snapId,
ID: snapID,
Region: region,
SizeInBytes: blockstorage.Int64(diskSize),
Tags: blockstorage.MapToKeyValue(tags),
Expand Down Expand Up @@ -573,11 +570,11 @@ func (s *AdStorage) VolumeCreateFromSnapshot(ctx context.Context, snapshot block
return nil, err
}

diskId, err := uuid.NewV1()
diskID, err := uuid.NewV1()
if err != nil {
return nil, errors.Wrap(err, "Failed to create UUID")
}
diskName := fmt.Sprintf(volumeNameFmt, diskId.String())
diskName := fmt.Sprintf(volumeNameFmt, diskID.String())
tags = blockstorage.SanitizeTags(tags)
createDisk := armcompute.Disk{
Name: blockstorage.StringPtr(diskName),
Expand Down
2 changes: 0 additions & 2 deletions pkg/blockstorage/azure/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

// TODO: Switch to using the latest azure sdk and remove nolint.
// Related Ticket- https://github.com/kanisterio/kanister/issues/168
//
//nolint:staticcheck
package azure

import (
Expand Down
8 changes: 4 additions & 4 deletions pkg/blockstorage/gcepd/gcepd.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ func (s *GpdStorage) SnapshotCopyWithArgs(ctx context.Context, from blockstorage

// SnapshotCreate is part of blockstorage.Provider
func (s *GpdStorage) SnapshotCreate(ctx context.Context, volume blockstorage.Volume, tags map[string]string) (*blockstorage.Snapshot, error) {
rbId, uerr := uuid.NewV1()
rbID, uerr := uuid.NewV1()
if uerr != nil {
return nil, errors.Wrap(uerr, "Failed to create UUID")
}
rb := &compute.Snapshot{
Name: fmt.Sprintf(snapshotNameFmt, rbId.String()),
Name: fmt.Sprintf(snapshotNameFmt, rbID.String()),
Labels: blockstorage.SanitizeTags(ktags.GetTags(tags)),
}
var err error
Expand Down Expand Up @@ -381,12 +381,12 @@ func (s *GpdStorage) VolumeCreateFromSnapshot(ctx context.Context, snapshot bloc
tags[tag.Key] = tag.Value
}
}
createDiskId, err := uuid.NewV1()
createDiskID, err := uuid.NewV1()
if err != nil {
return nil, errors.Wrap(err, "Failed to create UUID")
}
createDisk := &compute.Disk{
Name: fmt.Sprintf(volumeNameFmt, createDiskId.String()),
Name: fmt.Sprintf(volumeNameFmt, createDiskID.String()),
SizeGb: blockstorage.SizeInGi(snapshot.Volume.SizeInBytes),
Type: snapshot.Volume.VolumeType,
Labels: blockstorage.SanitizeTags(ktags.GetTags(tags)),
Expand Down
3 changes: 2 additions & 1 deletion pkg/blockstorage/zone/zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ import (
"sort"
"testing"

"github.com/kanisterio/kanister/pkg/kube"
. "gopkg.in/check.v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/fake"

"github.com/kanisterio/kanister/pkg/kube"
)

// Hook up gocheck into the "go test" runner.
Expand Down
3 changes: 2 additions & 1 deletion pkg/blueprint/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ package validate
import (
"fmt"

"github.com/pkg/errors"

kanister "github.com/kanisterio/kanister/pkg"
crv1alpha1 "github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1"
_ "github.com/kanisterio/kanister/pkg/function"
"github.com/kanisterio/kanister/pkg/param"
"github.com/kanisterio/kanister/pkg/utils"
"github.com/pkg/errors"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/chronicle/chronicle_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ import (
"context"
"io"

"github.com/pkg/errors"

"github.com/kanisterio/kanister/pkg/location"
"github.com/kanisterio/kanister/pkg/param"
"github.com/pkg/errors"
)

func Pull(ctx context.Context, target io.Writer, p param.Profile, manifest string) error {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/client/listers/cr/v1alpha1/repositoryserver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading