Skip to content

Commit

Permalink
Fix readme examples
Browse files Browse the repository at this point in the history
`AddEnv` is no longer a method on ContainerDie. Updated the examples to
use `EnvDie` instead.

Fixes #25

Signed-off-by: Scott Andrews <[email protected]>
  • Loading branch information
scothis committed Feb 7, 2022
1 parent d722f25 commit 38caef9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ die := dieappsv1.DeploymentBlank.
d.SpecDie(func(d *diecorev1.PodSpecDie) {
d.ContainerDie("app", func(d *diecorev1.ContainerDie) {
d.Image("registry.example/image:latest")
d.AddEnv("MY_VAR", "my-value")
d.EnvDie("MY_VAR", func(d *diecorev1.EnvVarDie) {
d.Value("my-value")
})
})
})
})
Expand Down Expand Up @@ -86,7 +88,9 @@ altDeployment := die.
d.TemplateDie(func(d *diecorev1.PodTemplateSpecDie) {
d.SpecDie(func(d *diecorev1.PodSpecDie) {
d.ContainerDie("app", func(d *diecorev1.ContainerDie) {
d.AddEnv("MY_VAR", "some-other-value")
d.EnvDie("MY_VAR", func(d *diecorev1.EnvVarDie) {
d.Value("some-other-value")
})
})
})
})
Expand Down

0 comments on commit 38caef9

Please sign in to comment.