go-plantuml

从 go 源文件或目录生成 plantuml 图表。「Generate plantuml diagrams from go source files or directories」

Github星跟蹤圖

go-plantuml

Build Status
Go Report Card

go-plantuml generates plantuml diagrams from go source files or directories.

Installation

go get -u github.com/bykof/go-plantuml

Please consider that $GOPATH/bin should be on our $PATH.

Usage

Usage:
  go-plantuml [command]

Available Commands:
  generate    Generate a plantuml diagram from given paths
  help        Help about any command

Flags:
  -h, --help     help for go-plantuml
  -t, --toggle   Help message for toggle

Use "go-plantuml [command] --help" for more information about a command.

Usage:
  go-plantuml generate [flags]

Flags:
  -d, --directories strings   the go source directories (default [.])
  -f, --files strings         the go source files
  -h, --help                  help for generate
  -o, --out string            the graphfile (default "graph.puml")
  -r, --recursive             traverse the given directories recursively

Example

For example we have to files in the directory testGraph.

// address.go
package testGraph

type (
	Address struct {
		Street     string
		City       string
		PostalCode string
		Country    string
	}
)

func (address Address) FullAddress(withPostalCode bool) string {
    return ""
}
// user.go
package testGraph

type (
	User struct {
		FirstName      string
		LastName       string
		age            uint8
		Address        Address
		privateAddress Address
	}
)

func (user *User) SetFirstName(firstName string) {}

Then we run go-plantuml generate or go-plantuml generate -d . -o graph.puml.

This will create a graph.puml file and check for .go files inside your current directory.

Which looks like this:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

主要指標

概覽
名稱與所有者bykof/go-plantuml
主編程語言Go
編程語言Go (語言數: 1)
平台Linux, Mac, Windows
許可證MIT License
所有者活动
創建於2020-01-21 09:41:01
推送於2024-12-20 09:53:58
最后一次提交2024-12-20 10:53:01
發布數17
最新版本名稱v1.3.5 (發布於 2024-12-20 10:53:57)
第一版名稱v1.0.0 (發布於 2020-12-22 09:32:31)
用户参与
星數409
關注者數9
派生數32
提交數83
已啟用問題?
問題數18
打開的問題數3
拉請求數10
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?