Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
fix: initialize maps
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Dec 9, 2019
1 parent 27dec7e commit bf7943d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Create a new repository (e.g. [email protected]:caos/my-orb.git)

```bash
# Download latest orbctl
curl -s https://api.github.com/repos/caos/orbiter/releases/latest | grep "browser_download_url.*orbctl-linux-amd64" | cut -d '"' -f 4 | sudo wget -i - -O /usr/local/bin/orbctl -
sudo chmod +x /usr/local/bin/orbctl
curl -s https://api.github.com/repos/caos/orbiter/releases/latest | grep "browser_download_url.*orbctl-linux-amd64" | cut -d '"' -f 4 | sudo wget -i - -O /usr/local/bin/orbctl - && \
sudo chmod +x /usr/local/bin/orbctl && \
sudo chown $(id -u):$(id -g) /usr/local/bin/orbctl

# Set some environment variables in order to avoid too much retyping.
Expand Down
11 changes: 5 additions & 6 deletions internal/core/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ type Iterator struct {

func New(args *Arguments) *Iterator {
return &Iterator{
args: args,
fired: make(chan struct{}),
args: args,
fired: make(chan struct{}),
secrets: make(map[string]interface{}),
}
}

Expand Down Expand Up @@ -129,10 +130,8 @@ func (i *Iterator) iterate(stop <-chan struct{}) *IterationDone {
return &IterationDone{Error: err}
}

var (
desired map[string]interface{}
current map[string]interface{}
)
desired := make(map[string]interface{})
current := make(map[string]interface{})

if err := yaml.Unmarshal(desiredBytes, &desired); err != nil {
return &IterationDone{Error: err}
Expand Down

0 comments on commit bf7943d

Please sign in to comment.