Skip to content

Commit 679073c

Browse files
committed
using pointers
1 parent 8f101fd commit 679073c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

buckets.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ type Bucket struct {
2121
Stream bool `json:"stream"`
2222
Ephemeral bool `json:"ephemeral"`
2323
Auth BucketAuth `json:"auth"`
24-
Inputs []Input `json:"inputs"` // readonly
25-
Outputs []Output `json:"outputs"` // readonly
24+
Inputs []*Input `json:"inputs"` // readonly
25+
Outputs []*Output `json:"outputs"` // readonly
2626
}
2727

2828
// MarshalJSON helper to marshal unix time

inputs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (api *API) ListInputs(options *InputListOptions) ([]*Input, error) {
9898

9999
var inputs []*Input
100100
for idx := range bucket.Inputs {
101-
inputs = append(inputs, &bucket.Inputs[idx])
101+
inputs = append(inputs, bucket.Inputs[idx])
102102
}
103103

104104
return inputs, nil
@@ -113,7 +113,7 @@ func (api *API) allInputList(opts *BucketListOptions) ([]*Input, error) {
113113
var inputs []*Input
114114
for idx := range buckets {
115115
for bIdx := range buckets[idx].Inputs {
116-
inputs = append(inputs, &buckets[idx].Inputs[bIdx])
116+
inputs = append(inputs, buckets[idx].Inputs[bIdx])
117117
}
118118
}
119119

outputs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (api *API) ListOutputs(options *OutputListOptions) ([]*Output, error) {
7979

8080
var outputs []*Output
8181
for idx := range bucket.Outputs {
82-
outputs = append(outputs, &bucket.Outputs[idx])
82+
outputs = append(outputs, bucket.Outputs[idx])
8383
}
8484

8585
return outputs, nil
@@ -94,7 +94,7 @@ func (api *API) allOutputList(options *BucketListOptions) ([]*Output, error) {
9494
var outputs []*Output
9595
for idx := range buckets {
9696
for bIdx := range buckets[idx].Outputs {
97-
outputs = append(outputs, &buckets[idx].Outputs[bIdx])
97+
outputs = append(outputs, buckets[idx].Outputs[bIdx])
9898
}
9999
}
100100

0 commit comments

Comments
 (0)