






















tcell is pretty nice to use

kill -9 $(pidof path/to/program) is pretty controlled way to stop a program





SIGUSR1 for status and SIGTERM for stop both of which you can catch

chan



chan 




func main() {
    inputChan := make(chan string)
    go func() {
        defer close(inputChan)
        scanner := bufio.NewScanner(os.Stdin)
        for scanner.Scan() {
            inputChan <- scanner.Text()
        }
    }()
    // Main loop
    for {
        select {
        case input, ok := <-inputChan:
            if ok {
                fmt.Println("received command: ", input)
            } else {
                return
            }
        default:
                    // Do whatever
        }
    }
}
This is about what I had in mind (edited)

func main() {
    inputChan := make(chan string)
    go func() {
        defer close(inputChan)
        scanner := bufio.NewScanner(os.Stdin)
        for scanner.Scan() {
            inputChan <- scanner.Text()
        }
    }()
    // Main loop
    for {
        select {
        case input, ok := <-inputChan:
            if ok {
                fmt.Println("received command: ", input)
            } else {
                return
            }
        default:
                    // Do whatever
        }
    }
}
This is about what I had in mind  (edited)


 
 



















tcell or sth









 1
 1
























 can i borrow one (edited)
 can i borrow one (edited)





















































 Go play ddnet for 10 hours
  Go play ddnet for 10 hours 
 Don't play ddnet for 1 day
  Don't play ddnet for 1 day 




 Go play ddnet for 10 hours
  Go play ddnet for 10 hours 
 Don't play ddnet for 1 day
  Don't play ddnet for 1 day  

















































































 2
 2











 
 







































































































 1
 1

 2
 2















 1
 1