项目作者: ironiridis

项目描述 :
Very simply formats a go slice of structs as a table, in ~100 lines
高级语言: Go
项目地址: git://github.com/ironiridis/astab.git
创建时间: 2020-05-25T02:39:03Z
项目社区:https://github.com/ironiridis/astab

开源协议:GNU General Public License v2.0

下载


astab

Very simply formats a go slice of structs as a table, in ~100 lines of gofmt’ed code. No dependencies.

Why?

I write a lot of little utility functions in Go, and over time I’m realizing my eyes are tired of looking at output from fmt.Printf’s %+v format.

If you have a slice of any arbitrary struct, you can dump its exported fields to os.Stdout in a nice table now.

Here’s hoping this never comes up in a job interview.