Skip to content

Commit

Permalink
Changed the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
diptanu committed Dec 18, 2015
1 parent 1ab3b23 commit 6810791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobspec/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ func parsePorts(networkObj *ast.ObjectList, nw *structs.NetworkResource) error {
knownPortLabels := make(map[string]bool)
for _, port := range portsObjList.Items {
if len(port.Keys) == 0 {
return fmt.Errorf("Nomad expects ports to be named")
return fmt.Errorf("Ports must be named")
}
label := port.Keys[0].Token.Value().(string)
if !reDynamicPorts.MatchString(label) {
Expand Down

2 comments on commit 6810791

@c4milo
Copy link
Contributor

@c4milo c4milo commented on 6810791 Dec 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: In Go, error messages usually start with lowercase. http://blog.golang.org/error-handling-and-go

@diptanu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c4milo Thanks!

Please sign in to comment.