moby/term

GitHub: moby/term

Moby 项目的终端处理库,提供终端状态检测、窗口大小获取和终端模式控制等工具函数。

Stars: 70 | Forks: 33

# term - 用于处理终端的工具 ![Test](https://static.pigsec.cn/wp-content/uploads/repos/cas/ce/ce733292a922c08274cf5a2096f8fa4cf01023bfa51a36ef6beecaaef371a9d9.svg) [![GoDoc](https://godoc.org/github.com/moby/term?status.svg)](https://godoc.org/github.com/moby/term) [![Go Report Card](https://goreportcard.com/badge/github.com/moby/term)](https://goreportcard.com/report/github.com/moby/term) term 提供了用于处理终端(状态、大小)的结构和辅助函数。 #### 使用 term ``` package main import ( "log" "os" "github.com/moby/term" ) func main() { fd := os.Stdin.Fd() if term.IsTerminal(fd) { ws, err := term.GetWinsize(fd) if err != nil { log.Fatalf("term.GetWinsize: %s", err) } log.Printf("%d:%d\n", ws.Height, ws.Width) } } ``` ## 版权与许可 代码和文档版权归 Docker, inc. 2015 所有。代码在 Apache 2.0 许可下发布。文档在 Creative commons 许可下发布。
标签:EVTX分析, Golang, 命令行界面, 安全编程, 开发库, 日志审计, 系统API, 终端工具