27 lines
445 B
Go
27 lines
445 B
Go
package main
|
|
|
|
import (
|
|
"cimeyclust.com/steel/pkg/cmd"
|
|
"cimeyclust.com/steel/pkg/net"
|
|
"sync"
|
|
)
|
|
|
|
func main() {
|
|
// Channel for stopping the program
|
|
stopChan := make(chan struct{})
|
|
var wg sync.WaitGroup
|
|
|
|
// Start the console handler
|
|
wg.Add(1)
|
|
go cmd.Start(&wg, stopChan)
|
|
|
|
// Start the network server
|
|
wg.Add(1)
|
|
go net.Start("localhost:8080", stopChan, &wg)
|
|
|
|
cmd.Logger.Info("Started")
|
|
|
|
// Wait for all components to finish
|
|
wg.Wait()
|
|
}
|