pkg/flow/server.go
Function initLegacyServer
has 99 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func initLegacyServer(circuit *core.Circuit, config *core.Config, db *gorm.DB, dbManager *database.SQLStore) (*server, error) {
srv := new(server)
srv.ID = uuid.New()
srv.initJQ()
srv.config = config
Function Run
has 70 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Run(circuit *core.Circuit) error {
config := &core.Config{}
if err := env.Parse(config); err != nil {
return fmt.Errorf("parsing env variables: %w", err)
}
Function initLegacyServer
has 13 return statements (exceeds 4 allowed). Open
Open
func initLegacyServer(circuit *core.Circuit, config *core.Config, db *gorm.DB, dbManager *database.SQLStore) (*server, error) {
srv := new(server)
srv.ID = uuid.New()
srv.initJQ()
srv.config = config
Function Run
has 12 return statements (exceeds 4 allowed). Open
Open
func Run(circuit *core.Circuit) error {
config := &core.Config{}
if err := env.Parse(config); err != nil {
return fmt.Errorf("parsing env variables: %w", err)
}