rgoplot/main.go

34 lines
535 B
Go

package main
import (
"flag"
"fmt"
)
var (
ChartDir string
Welcome string = `version: 1.0
http://`
)
func usage() {
fmt.Println("goplot version v1.0.1")
flag.PrintDefaults()
}
func main() {
var addr string
var port string
flag.StringVar(&ChartDir, "c", "./", "Chart dir")
flag.StringVar(&port, "p", "8000", "Listen port")
flag.StringVar(&addr, "a", "localhost", "Listen addr")
flag.Usage = usage
flag.Parse()
raddr := addr + ":" + port
Welcome += raddr
println(Welcome)
println(ListenAndServe(raddr).Error())
}