Skip to content
Snippets Groups Projects
Commit 2ec3349f authored by Eric Chiang's avatar Eric Chiang Committed by GitHub
Browse files

Merge pull request #686 from cjyar/master

Require the connector to have an ID.
parents e1f66791 a2b78c28
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,9 @@ func serve(cmd *cobra.Command, args []string) error { ...@@ -113,6 +113,9 @@ func serve(cmd *cobra.Command, args []string) error {
connectors := make([]server.Connector, len(c.Connectors)) connectors := make([]server.Connector, len(c.Connectors))
for i, conn := range 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 { if conn.Config == nil {
return fmt.Errorf("no config field for connector %q", conn.ID) return fmt.Errorf("no config field for connector %q", conn.ID)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment