Skip to content

Commit ef99c22

Browse files
authored
Fix a comment and some minor refactoring (#4410)
1 parent e6fa3e8 commit ef99c22

File tree

2 files changed

+6
-6
lines changed
  • agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/fault/v1/types
  • ecs-agent/tmds/handlers/fault/v1/types

2 files changed

+6
-6
lines changed

agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/fault/v1/types/types.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecs-agent/tmds/handlers/fault/v1/types/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ type NetworkBlackholePortRequest struct {
4747
Port *uint16 `json:"Port"`
4848
Protocol *string `json:"Protocol"`
4949
TrafficType *string `json:"TrafficType"`
50-
// SourcesToFilter is a list including IPv4 addresses or IPv4 CIDR blocks that will be excluded from the
51-
// network latency fault.
50+
// SourcesToFilter is a list including IPv4 addresses or IPv4 CIDR blocks that will be excluded
51+
// from the fault.
5252
SourcesToFilter []*string `json:"SourcesToFilter,omitempty"`
5353
}
5454

@@ -88,7 +88,7 @@ func (request *NetworkBlackholePortRequest) AddSourceToFilterIfNotAlready(source
8888
request.SourcesToFilter = []*string{}
8989
}
9090
for _, src := range request.SourcesToFilter {
91-
if src != nil && *src == source {
91+
if aws.StringValue(src) == source {
9292
return
9393
}
9494
}

0 commit comments

Comments
 (0)