jweinst1
5/3/2016 - 3:43 PM

simple go program to read from the console line

simple go program to read from the console line

package main

import (
    "fmt"
    "bufio"
    "os"
)

func main(){
    
    reader := bufio.NewReader(os.Stdin)
    fmt.Println("Simple Shell")
    fmt.Println("---------------------")
    
    for {
        fmt.Print("-> ")
        text, _ := reader.ReadString('\n')        
        fmt.Println(text)
    }
    
}