ソースを参照

Check one is set

Alex Dadgar 6 年 前
コミット
7c1f3f3d75
1 ファイル変更2 行追加0 行削除
  1. 2 0
      mux.go

+ 2 - 0
mux.go

@@ -65,6 +65,8 @@ func VerifyConfig(config *Config) error {
 	}
 	if config.LogOutput != nil && config.Logger != nil {
 		return fmt.Errorf("both Logger and LogOutput may not be set, select one")
+	} else if config.LogOutput == nil && config.Logger == nil {
+		return fmt.Errorf("one of Logger or LogOutput must be set, select one")
 	}
 	return nil
 }