xconsole

package
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2023 License: BSD-3-Clause-Clear Imports: 7 Imported by: 0

Documentation

Overview

命令行程序支持组件 此组件需要使用 xconsole.Listen() 来运行命令监听,即:

if len(os.Args) > 1 {
	xconsole.Listen()
	return
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen()

开始监听运行命令行程序

func Push

func Push(rou string, fun Command) error

推送任务到路由接口中

rou	执行的命令
fun	执行的命令内容

func PushMap

func PushMap(m map[string]Command) error

批量推送任务到路由接口中

m map结构的任务键值对

func Regedit

func Regedit(conf *Config)

注入配置

Types

type Command

type Command func(help bool) string

命令支持的函数结构

type Config

type Config struct {
	Version string             // 外部版本标识
	Rout    map[string]Command // 注入时直接携带路由进行注入
	// contains filtered or unexported fields
}

配置项

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL