goconsole:Golang 命令行功能

时间:2024-07-23 10:18:11
【文件属性】:

文件名称:goconsole:Golang 命令行功能

文件大小:7KB

文件格式:ZIP

更新时间:2024-07-23 10:18:11

Go

控制台 Golang 命令行功能 包提供简单的命令行功能,能够轻松添加命令和自定义界面。 提供的完整文档。 代码 package main import ( "fmt" "github.com/josephspurrier/goconsole" ) func main () { con := goconsole . New () con . Title = "*** Go Console *** \n " con . Prompt = "> " con . NotFound = "Command not found: " con . NewLine = " \n " con . Add ( "hello" , "Prints: world" , func ( typed string ) { fmt . Print ( "world" ) }) con . St


【文件预览】:
goconsole-master
----example_test.go(981B)
----LICENSE(11KB)
----README.md(947B)
----goconsole.go(5KB)

网友评论