Documentation ¶
Index ¶
- Constants
- func AlignCenter(s string, n int) string
- func AlignLeft(s string, n int) string
- func AlignRight(s string, n int) string
- func CollectEasy() []string
- func Colorize(text string, status string, background string, underline bool, highshow bool) string
- func GetIps() []string
- func GetNowTime() string
- func ParseIps(in string) ([]string, error)
- func ParsePorts(ports string) ([]int, error)
- func Pings(ips []string, rs chan PingResult) error
- func Pings2(ips []string, stop chan string, w io.Writer) error
- func Pings3(ips []string, stop chan string) error
- func Scan(in string)
- func ScanIp(g *gocui.Gui, w *gocui.View, width int) error
- func ScanIpPorts(g *gocui.Gui, w io.Writer, width int) error
- func ScanPort(host, port string) bool
- func ScanPort2H(ip string, ports string, stop chan string, w io.Writer) error
- func TableTest(w io.Writer, width int)
- type Align
- type Col
- type PingResult
- type Table
- func (this *Table) AddCol(title string) *Col
- func (this *Table) AddRow(row int, Data *Col)
- func (this *Table) AddRowByIndex(row int, Data *Col)
- func (this *Table) CalColumnWidths() error
- func (this *Table) Fprint(w io.Writer)
- func (this Table) FprintHeader(w io.Writer)
- func (this *Table) FprintOrderDesc(w io.Writer)
Constants ¶
View Source
const ( TextLeft = Align(iota) TextRight TextCenter )
Variables ¶
This section is empty.
Functions ¶
func CollectEasy ¶
func CollectEasy() []string
func Colorize ¶
文字字体 参数介绍:text->文本内容 status->文字颜色 background->背景颜色 underline->是否下划线 highshow->是否高亮 http://www.cnblogs.com/frydsh/p/4139922.html
func GetNowTime ¶
func GetNowTime() string
Types ¶
type PingResult ¶
type Table ¶
type Table struct { Header []*Col Rows [][]*Col // row 行 col 列 ColumnWidths []int ShowHeader bool // contains filtered or unexported fields }
func (*Table) AddRowByIndex ¶
顺序增加第row行的数据 指定index
func (*Table) CalColumnWidths ¶
func (Table) FprintHeader ¶
Click to show internal directories.
Click to hide internal directories.