// SPDX-License-Identifier: Apache-2.0 // Copyright © 2022 Roberto Hidalgo package main import ( "os" "git.rob.mx/nidito/chinampa" "git.rob.mx/nidito/chinampa/pkg/runtime" _ "git.rob.mx/nidito/puerta/cmd/admin" _ "git.rob.mx/nidito/puerta/cmd/hue" _ "git.rob.mx/nidito/puerta/cmd/server" "github.com/sirupsen/logrus" ) func main() { logrus.SetFormatter(&logrus.TextFormatter{ DisableLevelTruncation: true, DisableTimestamp: true, ForceColors: runtime.ColorEnabled(), }) if runtime.DebugEnabled() { logrus.SetLevel(logrus.DebugLevel) logrus.Debug("Debugging enabled") } cfg := chinampa.Config{ Name: "puerta", Version: "0.0.0", Summary: "opens the door to my house", Description: "Does other door related stuff too.", } if err := chinampa.Execute(cfg); err != nil { logrus.Errorf("total failure: %s", err) os.Exit(2) } }