Skip to content

Commit 1d6f52f

Browse files
authored
Replace all printf-like functions that lack format strings (#975)
1 parent 5b851ff commit 1d6f52f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/v1beta1/disruption_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ func (s DisruptionSpec) Explain() []string {
957957
}
958958

959959
if s.OnInit {
960-
explanation = append(explanation, fmt.Sprintf("spec.onInit is true. "+
960+
explanation = append(explanation, fmt.Sprint("spec.onInit is true. "+
961961
"The disruptions will be launched during the initialization of the targeted pods."+
962962
"This requires some extra setup on your end, please [read the full documentation](https://github.com/DataDog/chaos-controller/blob/main/docs/features.md#applying-a-disruption-on-pod-initialization)"))
963963
}
@@ -990,7 +990,7 @@ func (s DisruptionSpec) Explain() []string {
990990
))
991991

992992
if s.StaticTargeting {
993-
explanation = append(explanation, fmt.Sprintf("spec.staticTargeting is true, so after we pick an initial set of targets and inject, "+
993+
explanation = append(explanation, fmt.Sprint("spec.staticTargeting is true, so after we pick an initial set of targets and inject, "+
994994
"we will not attempt to inject into any new targets that appear while the disruption is ongoing."))
995995
} else {
996996
explanation = append(explanation, "By default we will continually compare the injected target count "+

api/v1beta1/network_disruption.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (s *NetworkHTTPFilters) validatePaths(retErr error) error {
251251
visitedPaths[path] = visitedPath
252252

253253
if isMultiplePath && path == DefaultHTTPPathFilter {
254-
retErr = multierror.Append(retErr, fmt.Errorf(HTTPPathsFilterErrorPrefix+"no needs to define other paths if the / path is defined because it already catches all paths"))
254+
retErr = multierror.Append(retErr, errors.New(HTTPPathsFilterErrorPrefix+"no needs to define other paths if the / path is defined because it already catches all paths"))
255255
}
256256

257257
if err := path.validate(); err != nil {

0 commit comments

Comments
 (0)