diff --git a/internal/remote/patch.go b/internal/remote/patch.go index 34f136e6..87613cea 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/site/.hugo_build.lock b/site/.hugo_build.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/vm/internal/importers/data-source.go b/vm/internal/importers/data-source.go index 452caac4..a9261a34 100644 --- a/vm/internal/importers/data-source.go +++ b/vm/internal/importers/data-source.go @@ -44,9 +44,7 @@ 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 3f2d0cd6..1cb6a2b8 100644 --- a/vm/internal/importers/glob.go +++ b/vm/internal/importers/glob.go @@ -73,22 +73,23 @@ 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 b8565d10..ebfd7a9b 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