28 lines
305 B
Go
28 lines
305 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"os/user"
|
|
|
|
"github.com/go-flucky/flucky/cmd"
|
|
)
|
|
|
|
var version string
|
|
|
|
func main() {
|
|
|
|
user, err := user.Current()
|
|
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
if user.Uid != "0" {
|
|
log.Println("you need to be root to run this command")
|
|
os.Exit(1)
|
|
}
|
|
|
|
cmd.Execute(version)
|
|
}
|