Skip to content

Commit

Permalink
change *bool -> bool
Browse files Browse the repository at this point in the history
exclude trivalent logic.
  • Loading branch information
fujiwara committed May 12, 2023
1 parent f597edb commit c7e6a17
Show file tree
Hide file tree
Showing 18 changed files with 255 additions and 256 deletions.
5 changes: 2 additions & 3 deletions appspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
"fmt"
"strings"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/kayac/ecspresso/v2/appspec"
)

type AppSpecOption struct {
TaskDefinition *string `help:"use task definition arn in AppSpec (latest, current or Arn)" default:"latest"`
UpdateService *bool `help:"update service definition with task definition arn" default:"true" negatable:""`
UpdateService bool `help:"update service definition with task definition arn" default:"true" negatable:""`
}

func (d *App) AppSpec(ctx context.Context, opt AppSpecOption) error {
Expand All @@ -38,7 +37,7 @@ func (d *App) AppSpec(ctx context.Context, opt AppSpecOption) error {
return fmt.Errorf("--task-definition requires current, latest or a valid task definition arn")
}
}
if aws.ToBool(opt.UpdateService) {
if opt.UpdateService {
newSv, err := d.LoadServiceDefinition(d.config.ServiceDefinitionPath)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion autoscaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (d *App) modifyAutoScaling(ctx context.Context, opt DeployOption) error {
return nil
}

if *opt.DryRun {
if opt.DryRun {
return nil
}
for _, target := range out.ScalableTargets {
Expand Down

0 comments on commit c7e6a17

Please sign in to comment.