Skip to content
Snippets Groups Projects
daemon.go 404 B
Newer Older
  • Learn to ignore specific revisions
  • package cli
    
    import (
    	"code.fbi.h-da.de/cocsn/gosdn/nucleus"
    	log "github.com/sirupsen/logrus"
    	"os"
    )
    
    func Gosdn() error {
    	_, debug := os.LookupEnv("GOSDN_DEBUG")
    	if debug {
    		log.SetLevel(log.DebugLevel)
    	}
    
    	// Setup a channel to communicate if goSDN should shutdown.
    	IsRunningChannel := make(chan bool)
    
    	// hand off to cmd for further processing
    	return nucleus.StartAndRun(IsRunningChannel)
    }