diff --git a/.golangci.yml b/.golangci.yml index 5f48fe39..58b419d2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,7 +11,6 @@ linters-settings: linters: disable-all: true enable: - - deadcode - depguard - dogsled - errcheck @@ -24,8 +23,6 @@ linters: - govet - ineffassign - staticcheck - - structcheck - stylecheck - typecheck - unconvert - - varcheck diff --git a/internal/remote/patch.go b/internal/remote/patch.go index 87613cea..34f136e6 100644 --- a/internal/remote/patch.go +++ b/internal/remote/patch.go @@ -116,10 +116,10 @@ func deleteEmpty(parent map[string]interface{}, key string) { // contains empty objects. It makes an assumption that there is actually no reason an empty object // needs to be updated for a Kubernetes resource considering that the server would already have an object // there on initial create if needed. Things considered empty will be of the form: -// {} -// { metadata: { labels: {}, annotations: {} } -// { metadata: { labels: {}, annotations: {} }, spec: { foo: { bar: {} } } } // +// {} +// { metadata: { labels: {}, annotations: {} } +// { metadata: { labels: {}, annotations: {} }, spec: { foo: { bar: {} } } } func isEmptyPatch(patch []byte) bool { var root map[string]interface{} err := json.Unmarshal(patch, &root) diff --git a/vm/internal/importers/data-source.go b/vm/internal/importers/data-source.go index a9261a34..452caac4 100644 --- a/vm/internal/importers/data-source.go +++ b/vm/internal/importers/data-source.go @@ -44,7 +44,9 @@ type DataSourceImporter struct { // NewDataSourceImporter returns an importer that can resolve paths for the specified datasource. // It processes entries of the form -// data://{name}[/{path-to-be-resolved}] +// +// data://{name}[/{path-to-be-resolved}] +// // If no path is provided, it is set to "/" func NewDataSourceImporter(source datasource.DataSource) *DataSourceImporter { exact := fmt.Sprintf("%s://%s", dsPrefix, source.Name()) diff --git a/vm/internal/importers/glob.go b/vm/internal/importers/glob.go index 1cb6a2b8..3f2d0cd6 100644 --- a/vm/internal/importers/glob.go +++ b/vm/internal/importers/glob.go @@ -73,23 +73,22 @@ type globEntry struct { // // That is, given the following directory structure: // -// lib -// - a.json -// - b.json -// caller -// - c.libsonnet +// lib +// - a.json +// - b.json +// caller +// - c.libsonnet // // where c.libsonnet has the following contents // -// import 'glob-import:../lib/*.json' +// import 'glob-import:../lib/*.json' // // evaluating `c.libsonnet` will return jsonnet code of the following form: // -// { -// '../lib/a.json': import '../lib/a.json', -// '../lib/b.json': import '../lib/b.json', -// } -// +// { +// '../lib/a.json': import '../lib/a.json', +// '../lib/b.json': import '../lib/b.json', +// } type GlobImporter struct { innerVerb string prefix string diff --git a/vm/vars_test.go b/vm/vars_test.go index ebfd7a9b..b8565d10 100644 --- a/vm/vars_test.go +++ b/vm/vars_test.go @@ -1,17 +1,17 @@ /* - Copyright 2021 Splunk Inc. +Copyright 2021 Splunk Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ package vm