Skip to content

Commit

Permalink
fix: reduce example change
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza committed Feb 26, 2024
1 parent cfba84f commit d49f68a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion e2e-tests/resources/outputs/example-04-extras-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
ports:
- target: 80
published: "8000"
protocol: tcp
volumes:
- type: volume
source: data
Expand Down
6 changes: 3 additions & 3 deletions internal/compose/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ func ConvertSpec(spec *score.Workload) (*compose.Project, ExternalVariables, err
ports = []compose.ServicePortConfig{}
for _, pSpec := range spec.Service.Ports {
var pubPort = fmt.Sprintf("%v", pSpec.Port)
var protocol = score.ServicePortProtocolTCP
var protocol string
if pSpec.Protocol != nil {
protocol = *pSpec.Protocol
protocol = strings.ToLower(string(*pSpec.Protocol))
}
ports = append(ports, compose.ServicePortConfig{
Published: pubPort,
Target: uint32(DerefOr(pSpec.TargetPort, pSpec.Port)),
Protocol: strings.ToLower(string(protocol)),
Protocol: protocol,
})
}
}
Expand Down

0 comments on commit d49f68a

Please sign in to comment.