Fix atomic string handling for JSON output

This commit is contained in:
Dane Everitt
2020-11-06 22:22:33 -08:00
parent 944d381778
commit 4b17ac4f1c
3 changed files with 22 additions and 16 deletions

View File

@@ -48,7 +48,7 @@ type Environment struct {
emitter *events.EventBus
// Tracks the environment state.
st system.AtomicString
st *system.AtomicString
}
// Creates a new base Docker environment. The ID passed through will be the ID that is used to
@@ -65,10 +65,9 @@ func New(id string, m *Metadata, c *environment.Configuration) (*Environment, er
Configuration: c,
meta: m,
client: cli,
st: system.NewAtomicString(environment.ProcessOfflineState),
}
e.st.Store(environment.ProcessOfflineState)
return e, nil
}