Skip to content

Commit c0b1b76

Browse files
committed
wip
1 parent 9873aac commit c0b1b76

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

bundle/direct/dresources/adapter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ type Adapter struct {
107107

108108
fieldTriggersLocal map[string]deployplan.ActionType
109109
fieldTriggersRemote map[string]deployplan.ActionType
110-
keyedSlices map[string]any
111-
keyedSliceTrie *structtrie.Node
110+
// keyedSlices map[string]any
111+
keyedSliceTrie *structtrie.Node
112112
}
113113

114114
func NewAdapter(typedNil any, client *databricks.WorkspaceClient) (*Adapter, error) {

libs/structs/structtrie/trie.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package structtrie
22

33
import (
4+
"errors"
45
"fmt"
56

67
"github.com/databricks/cli/libs/structs/structpath"
@@ -73,7 +74,7 @@ func NewFromMap(values map[string]any) (*Node, error) {
7374
// A nil path represents the root node.
7475
func Insert(root *Node, path *structpath.PathNode, value any) (*Node, error) {
7576
if root == nil {
76-
return nil, fmt.Errorf("root cannot be nil")
77+
return nil, errors.New("root cannot be nil")
7778
}
7879

7980
if path == nil {
@@ -258,19 +259,19 @@ var wildcardComponent = componentKey{kind: componentKindWildcard}
258259

259260
func componentFromPattern(node *structpath.PathNode) (componentKey, error) {
260261
if node == nil {
261-
return componentKey{}, fmt.Errorf("nil path node")
262+
return componentKey{}, errors.New("nil path node")
262263
}
263264

264265
if node.DotStar() || node.BracketStar() {
265266
return wildcardComponent, nil
266267
}
267268

268269
if _, ok := node.Index(); ok {
269-
return componentKey{}, fmt.Errorf("array indexes are not supported in prefix tree keys")
270+
return componentKey{}, errors.New("array indexes are not supported in prefix tree keys")
270271
}
271272

272273
if _, _, ok := node.KeyValue(); ok {
273-
return componentKey{}, fmt.Errorf("key-value selectors are not supported in prefix tree keys")
274+
return componentKey{}, errors.New("key-value selectors are not supported in prefix tree keys")
274275
}
275276

276277
if key, ok := node.StringKey(); ok {

0 commit comments

Comments
 (0)