Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
kedge init: fix wrong type for ports (#399)
Browse files Browse the repository at this point in the history
portMappings should be []string not []int
fixes #396
  • Loading branch information
kadel authored and cdrage committed Oct 31, 2017
1 parent 766829c commit d7c14a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ import (
var (
fileName, image, name string
controller string
ports []int
ports []string
)

type Container struct {
Image string `json:"image,omitempty"`
}

type Service struct {
PortMappings []int `json:"portMappings,omitempty"`
PortMappings []string `json:"portMappings,omitempty"`
}

type App struct {
Expand Down Expand Up @@ -109,7 +109,7 @@ func init() {
initCmd.Flags().StringVarP(&fileName, "out", "o", "kedge.yml", "Output filename")
initCmd.Flags().StringVarP(&name, "name", "n", "", "The name of service")
initCmd.Flags().StringVarP(&image, "image", "i", "", "The image for the container to run")
initCmd.Flags().IntSliceVarP(&ports, "ports", "p", []int{}, "The ports that this container exposes")
initCmd.Flags().StringSliceVarP(&ports, "ports", "p", []string{}, "The ports that this container exposes")
initCmd.Flags().StringVarP(&controller, "controller", "c", "", "The type of controller this application is. Legal values [Deployment, Job, DeploymentConfig]. Default 'Deployment'.")
RootCmd.AddCommand(initCmd)
}

0 comments on commit d7c14a2

Please sign in to comment.