github.com/gogf/gf@v1.16.9/.example/os/gcmd/main.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/gogf/gf/frame/g"
     7  	"github.com/gogf/gf/os/gcmd"
     8  )
     9  
    10  func main() {
    11  	p, err := gcmd.Parse(g.MapStrBool{
    12  		"n,name":        true,
    13  		"p,prefix":      true,
    14  		"f,force":       false,
    15  		"t,tail":        false,
    16  		"i,interactive": false,
    17  	})
    18  	if err != nil {
    19  		fmt.Println(err)
    20  	}
    21  	g.Dump(p)
    22  }