Skip to content

Commit

Permalink
Fix: don't validate port, perhaps someone is using 0?
Browse files Browse the repository at this point in the history
  • Loading branch information
betamos committed Aug 28, 2023
1 parent b6344f5 commit 9fe4b84
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,12 @@ func (s *Service) Validate() error {
if err := s.Type.Validate(); err != nil {
return err
}
if s.Hostname == "" {
if s.Name == "" {
return errors.New("no name specified")
}
if s.Hostname == "" {
return errors.New("no hostname specified")
}
if s.Port == 0 {
return errors.New("port is 0")
}
return nil
}

Expand Down

0 comments on commit 9fe4b84

Please sign in to comment.