Coder Social home page Coder Social logo

go-plantuml's Introduction

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

go-plantuml's People

Contributors

bykof avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.