Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-burt committed Sep 6, 2024
1 parent 1c151b6 commit 51e2bbc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
6 changes: 3 additions & 3 deletions internal/remote/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Empty file removed site/.hugo_build.lock
Empty file.
4 changes: 1 addition & 3 deletions vm/internal/importers/data-source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
21 changes: 11 additions & 10 deletions vm/internal/importers/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions vm/vars_test.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 51e2bbc

Please sign in to comment.