Merge pull request #686 from cjyar/master

Require the connector to have an ID.
This commit is contained in:
Eric Chiang 2016-11-15 11:10:22 -08:00 committed by GitHub
commit 2ec3349f5d

View file

@ -113,6 +113,9 @@ func serve(cmd *cobra.Command, args []string) error {
connectors := make([]server.Connector, len(c.Connectors))
for i, conn := range c.Connectors {
if conn.ID == "" {
return fmt.Errorf("no ID field for connector %d", i)
}
if conn.Config == nil {
return fmt.Errorf("no config field for connector %q", conn.ID)
}