Generate plantuml diagrams from go source files or directories

Overview

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 test.

// address.go
package models

type (
	Address struct {
		Street        string
		City          string
		PostalCode    string
		Country       string
		CustomChannel chan string
		AnInterface   *interface{}
	}
)

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

import "github.com/bykof/go-plantuml/test/address/models"

type (
	User struct {
		FirstName      string
		LastName       string
		Age            uint8
		Address        *models.Address
		privateAddress models.Address
	}
)

func (user *User) SetFirstName(firstName string) {
	user.FirstName = firstName
}

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

Comments
  • Support top-level functions

    Support top-level functions

    It would be nice if go-plantuml would support top-level functions (instead of only methods).

    The main problem will be the decision on how to represent these, as UML ususally doesn't provide a notion of top-level functions.

    One possibility would be to misuse a class for that purpose. See this discussion about such a topic.

    I have prepared a rough idea how that could be achieved.

    For the following classes:

    // mypackage/functions.go
    package mypackage
    
    func Function1() []string {
      return []string{}
    }
    
    func Function2(param1, param2 string) {
    }
    
    // otherpackage.functions.go
    package otherpackage
    
    func New() MyStruct {
      return MyStruct{}
    }
    
    func Frobnicate(subject []string) {
    }
    
    // otherpackage/mystruct.go
    package otherpackage
    
    import (
      "fmt"
    
      "my.domain/rough/mypackage"
    )
    
    type MyStruct struct {
      Name string
    }
    
    func (s *MyStruct) DoSomething() {
      v := mypackage.Function1()
      fmt.Println(v)
    }
    
    func (s *MyStruct) GetSomething() string {
      return s.Name
    }
    

    the following puml file could be generated:

    @startuml
    title Rough idea
    namespace mypackage {
      class mypackage.functions << (F, blanchedalmond) >> {
        + Function1() []string
        + Function2(string, string)
      }
    }
    namespace otherpackage {
      class otherpackage.MyStruct << (S, aquamarine) >> {
        + Name string
        + DoSomething()
        + GetSomething() string
      }
    
      class otherpackage.functions << (F, blanchedalmond) >> {
        + New() MyStruct
        + Frobnicate([]string)
      }
    }
    
    otherpackage.MyStruct uses --> mypackage.functions
    @enduml
    

    which would be rendered as:

    dummy

    Here a class with the dummy name "functions" is generated inside each package to hold all global functions of that package. To differentiate between this function "holder" and real structs I added the "F" and "S" symbol to them (an idea I have taken from https://github.com/jfeliu007/goplantuml). Maybe the functions "holder" could also be specified as "abstract".

    As MyStruct calls mypackage.Function1 in its DoSomething() method I added a "usage"-association between them.

    enhancement 
    opened by hupfdule 4
  • Messages while installing

    Messages while installing

    When I install, I've got the following "disturbing" messages:

    cd /Users/marcelloh/go/src/golang.org/x/sys; git pull --ff-only

    error: Your local changes to the following files would be overwritten by merge: error: The following untracked working tree files would be removed by merge:

    Please move or remove them before you merge. Aborting package golang.org/x/sys/unix: exit status 1

    cd /Users/marcelloh/go/src/gopkg.in/yaml.v2; git pull --ff-only

    error: Your local changes to the following files would be overwritten by merge: Please commit your changes or stash them before you merge. Aborting package gopkg.in/yaml.v2: exit status 1

    Totally not what I expect for installing software :-(

    opened by marcelloh 2
  • Can not install on macOS 12.3.1

    Can not install on macOS 12.3.1

    What I did?

     go install github.com/bykof/[email protected]
    

    Error

    [email protected] ~ % go install github.com/bykof/[email protected]
    # golang.org/x/sys/unix
    go/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: too many errors
    

    os: macos 12.3.1 apple silicon

    go env

    [email protected] ~ % go env
    GO111MODULE=""
    GOARCH="amd64"
    GOBIN="//Users/nikolaydubina/go/bin"
    GOCACHE="/Users/nikolaydubina/Library/Caches/go-build"
    GOENV="/Users/nikolaydubina/Library/Application Support/go/env"
    GOEXE=""
    GOEXPERIMENT=""
    GOFLAGS=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOINSECURE=""
    GOMODCACHE="/Users/nikolaydubina/go/pkg/mod"
    GONOPROXY=""
    GONOSUMDB=""
    GOOS="darwin"
    GOPATH="/Users/nikolaydubina/go"
    GOPRIVATE=""
    GOPROXY="https://proxy.golang.org,direct"
    GOROOT="/usr/local/go"
    GOSUMDB="sum.golang.org"
    GOTMPDIR=""
    GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
    GOVCS=""
    GOVERSION="go1.18"
    GCCGO="gccgo"
    GOAMD64="v1"
    AR="ar"
    CC="clang"
    CXX="clang++"
    CGO_ENABLED="1"
    GOMOD="/dev/null"
    GOWORK=""
    CGO_CFLAGS="-g -O2"
    CGO_CPPFLAGS=""
    CGO_CXXFLAGS="-g -O2"
    CGO_FFLAGS="-g -O2"
    CGO_LDFLAGS="-g -O2"
    PKG_CONFIG="pkg-config"
    GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dt/1y99_j6s0yj7y151_dr026gh0000gn/T/go-build1622984580=/tmp/go-build -gno-record-gcc-switches -fno-common"
    
    opened by nikolaydubina 1
  • Hi! Error when installing github.com/alecthomas/template

    Hi! Error when installing github.com/alecthomas/template

    Hi! What's wrong?

    D:\Go\freicon>go get -u github.com/bykof/go-plantuml
    go: downloading github.com/bykof/go-plantuml v1.0.0
    go get: github.com/bykof/[email protected] requires
            github.com/spf13/[email protected] requires
            github.com/prometheus/[email protected] requires
            github.com/prometheus/[email protected] requires
            github.com/alecthomas/[email protected]: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in D:\Go\pkg\mod\cache\vcs\61f91bfbd5e8d360ddae1fd4e3843dd5ed1a8022685
    79745aa0647da3aee84d3: exit status 128:
            fatal: 'origin' does not appear to be a git repository
            fatal: Could not read from remote repository.
    
            Please make sure you have the correct access rights
            and the repository exists.
    
    
    D:\Go\freicon>go get github.com/alecthomas/template
    go get: module github.com/alecthomas/template: git ls-remote -q origin in D:\Go\pkg\mod\cache\vcs\61f91bfbd5e8d360ddae1fd4e3843dd5ed1a802268579745aa0647da3aee84d3: exit status 128:
            fatal: 'origin' does not appear to be a git repository
            fatal: Could not read from remote repository.
    
            Please make sure you have the correct access rights
            and the repository exists.
    
    opened by kolkov 1
  • issue with golang 1.18 - golang.org/x/sys/unix

    issue with golang 1.18 - golang.org/x/sys/unix

    I am getting

    go: downloading github.com/bykof/go-plantuml v1.0.0
    # golang.org/x/sys/unix
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.1_13.go:27:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.1_13.go:40:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:28:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:43:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:59:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:75:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:90:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:105:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:121:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:121:3: too many errors
    make: *** [deps] Error 2
    

    when running

    go install github.com/bykof/[email protected]
    

    related issue 49219

    opened by rohitkeshwani07 1
  • methods are not generated on User if using a pointer receiver

    methods are not generated on User if using a pointer receiver

    methods are not generated if using a pointer receiver

    example

    type (
    	User struct {
    		FirstName      string
    		LastName       string
    		Age            uint8
    		Address        Address
    		privateAddress Address
    	}
    )
    
    func (user *User) SetFirstName(firstName string) {
    	user.FirstName = firstName
    }
    

    will not generate the method in the resulting puml file

    @startuml
    class User {
    +FirstName: string
    +LastName: string
    +Age: uint8
    +Address: Address
    -privateAddress: Address
    
    }
    class Address {
    +Street: string
    +City: string
    +PostalCode: string
    +Country: string
    +FullAddress(withPostalCode bool): string
    }
    User --> Address
    @enduml
    

    this will

    type (
    	User struct {
    		FirstName      string
    		LastName       string
    		Age            uint8
    		Address        Address
    		privateAddress Address
    	}
    )
    
    func (user User) SetFirstName(firstName string) {
    	user.FirstName = firstName
    }
    
    
    @startuml
    class User {
    +FirstName: string
    +LastName: string
    +Age: uint8
    +Address: Address
    -privateAddress: Address
    +SetFirstName(firstName string): 
    }
    class Address {
    +Street: string
    +City: string
    +PostalCode: string
    +Country: string
    +FullAddress(withPostalCode bool): string
    }
    User --> Address
    @enduml
    
    go version go1.15.2 linux/amd64
    
    openjdk version "11.0.9.1" 2020-11-04
    OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
    OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
    
    NAME="Ubuntu"
    VERSION="18.04.5 LTS (Bionic Beaver)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 18.04.5 LTS"
    VERSION_ID="18.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=bionic
    UBUNTU_CODENAME=bionic
    
    
    bug 
    opened by markgardner10 1
  • Handle cases relations to a pointer

    Handle cases relations to a pointer

    This addresses the case where a relationship from one struct to another is set up as a pointer.

    I found this easiest to illustrate by changing both of the Address references in test/user/models/user.go to pointers, which results in the following diagram prior to this change:

    image

    And with the change it results in what you would expect:

    image

    opened by joonas 0
  • Handle cases where class is not found

    Handle cases where class is not found

    This addresses the case where a function is associated with an ast.ArrayType as is the case with the functions associated with domain.Classes.

    While I didn't add a test for it, it's easy enough to replicate by running the following at the root of this repository:

    go install . && go-plantuml generate -r
    

    Closes #7

    opened by joonas 0
  • Handle current working directory being the directory path

    Handle current working directory being the directory path

    Previously if you tried running go-plantuml generate in the context of the current working directory (as opposed to recursively walking the subdirectories), go-plantuml would run into a panic as captured in #6 and by running the tests:

    $ go test ./...
    ?   	github.com/bykof/go-plantuml	[no test files]
    --- FAIL: Test_dotNotatedModulePath (0.00s)
    panic: runtime error: slice bounds out of range [:6] with length 1 [recovered]
    	panic: runtime error: slice bounds out of range [:6] with length 1
    
    goroutine 38 [running]:
    testing.tRunner.func1.2({0x1023247c0, 0x1400001a240})
    	/opt/homebrew/Cellar/go/1.17.3/libexec/src/testing/testing.go:1209 +0x258
    testing.tRunner.func1(0x14000170ea0)
    	/opt/homebrew/Cellar/go/1.17.3/libexec/src/testing/testing.go:1212 +0x284
    panic({0x1023247c0, 0x1400001a240})
    	/opt/homebrew/Cellar/go/1.17.3/libexec/src/runtime/panic.go:1038 +0x21c
    github.com/bykof/go-plantuml/astParser.dotNotatedModulePath({0x1022ac828, 0xa}, {0x1022ab7c9, 0x6})
    	/Users/joonas/go/src/github.com/joonas/go-plantuml/astParser/parser.go:176 +0x140
    github.com/bykof/go-plantuml/astParser.Test_dotNotatedModulePath(0x14000170ea0)
    	/Users/joonas/go/src/github.com/joonas/go-plantuml/astParser/parser_test.go:12 +0x48
    testing.tRunner(0x14000170ea0, 0x102334260)
    	/opt/homebrew/Cellar/go/1.17.3/libexec/src/testing/testing.go:1259 +0x104
    created by testing.(*T).Run
    	/opt/homebrew/Cellar/go/1.17.3/libexec/src/testing/testing.go:1306 +0x328
    FAIL	github.com/bykof/go-plantuml/astParser	0.267s
    ?   	github.com/bykof/go-plantuml/cmd	[no test files]
    ok  	github.com/bykof/go-plantuml/domain	(cached)
    ?   	github.com/bykof/go-plantuml/formatter	[no test files]
    ?   	github.com/bykof/go-plantuml/test/address/models	[no test files]
    ?   	github.com/bykof/go-plantuml/test/user/models	[no test files]
    FAIL
    

    This patch simplifies the logic slightly by simply converting dirPath into the dot-notated module path format and checks whether the module path would simply translate to ., in which case we can simply return the supplied moduleName.

    Closes #6

    opened by joonas 0
  • panic: runtime error: index out of range [-1]

    panic: runtime error: index out of range [-1]

    go-plantuml generate -r panic: runtime error: index out of range [-1]

    goroutine 1 [running]: github.com/bykof/go-plantuml/astParser.ParseFile(0xc000018dc8, 0x15, 0x77992c, 0x5, 0xffffffffffffffff) /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/astParser/parser.go:110 +0x91e github.com/bykof/go-plantuml/astParser.ParseDirectory(0xc0001aaa50, 0x7, 0x1, 0xc0001aaa50, 0x7, 0x0) /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/astParser/parser.go:26 +0x465 github.com/bykof/go-plantuml/astParser.ParseDirectory(0xc0001aaa35, 0x3, 0x1, 0xc0001aaa35, 0x3, 0x0) /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/astParser/parser.go:29 +0x2ad github.com/bykof/go-plantuml/astParser.ParseDirectory(0x77902d, 0x1, 0x1, 0x5, 0x4, 0xc000013bc0) /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/astParser/parser.go:29 +0x2ad github.com/bykof/go-plantuml/cmd.glob..func1(0x9ab500, 0xc0000510a0, 0x0, 0x1) /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/cmd/generate.go:28 +0x1dd github.com/spf13/cobra.(*Command).execute(0x9ab500, 0xc000051090, 0x1, 0x1, 0x9ab500, 0xc000051090) /home/enzo/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x2c2 github.com/spf13/cobra.(*Command).ExecuteC(0x9ab780, 0xc000000180, 0x200000003, 0xc000000180) /home/enzo/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /home/enzo/go/pkg/mod/github.com/spf13/[email protected]/command.go:902 github.com/bykof/go-plantuml/cmd.Execute() /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/cmd/root.go:22 +0x31 main.main() /home/enzo/go/pkg/mod/github.com/bykof/[email protected]/main.go:6 +0x25

    opened by enzofoucaud 0
  • panic: runtime error: slice bounds out of range [:4] with length 1

    panic: runtime error: slice bounds out of range [:4] with length 1

    panic: runtime error: slice bounds out of range [:4] with length 1

    goroutine 1 [running]: github.com/bykof/go-plantuml/astParser.dotNotatedModulePath({0xc00001aa88, 0xc00001aa88}, {0xc00001abe8, 0x0}) /home/kent/vgo/github.com/bykof/go-plantuml/astParser/parser.go:176 +0xfa github.com/bykof/go-plantuml/astParser.ParseFile({0xc00001aa88, 0x7}) /home/kent/vgo/github.com/bykof/go-plantuml/astParser/parser.go:67 +0x207 github.com/bykof/go-plantuml/cmd.glob..func1(0x953da0, {0x709244, 0x6, 0x6}) /home/kent/vgo/github.com/bykof/go-plantuml/cmd/generate.go:24 +0x28f github.com/spf13/cobra.(*Command).execute(0x953da0, {0xc000070660, 0x6, 0x6}) /opt/Go-T/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x5f8 github.com/spf13/cobra.(*Command).ExecuteC(0x954020) /opt/Go-T/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fc github.com/spf13/cobra.(*Command).Execute(...) /opt/Go-T/pkg/mod/github.com/spf13/[email protected]/command.go:864 github.com/bykof/go-plantuml/cmd.Execute() /home/kent/vgo/github.com/bykof/go-plantuml/cmd/root.go:22 +0x25 main.main() /home/kent/vgo/github.com/bykof/go-plantuml/main.go:6 +0x17

    opened by wpecker 0
  • Error when struct declaration is in a different file than its method

    Error when struct declaration is in a different file than its method

    Hi,

    go-plantuml cannot seem to find a type if its declaration is in a different file than one of its method.

    For example, with the following files:

    impl.go:

    package models
    
    func (user *User) SetFirstName(firstName string) {
    	user.FirstName = firstName
    }
    
    func PackageFunction() string {
    	return "Hello World"
    }
    

    user.go:

    package models
    
    type User struct {
    	FirstName      string
    	LastName       string
    	Age            uint8
    }
    

    I'm getting the following error when running go-plantuml generate:

    2022/09/08 14:45:56 Could not find class: User for function SetFirstName
    

    This seems to depend on the name of the files and the order in which they are parsed by the tool. The same issue happens if the type is an alias (e.g. type User string).

    opened by jeandeaual 1
  • Add depth option for

    Add depth option for "file"command

    When generating a graph for a file it would be nice to have an option to specify a depth for dependencies. A pratical example would be in a file blahblah.go I have a struct A that has a struct B as a property. When generating the diagram for blahblah.go it would be awesome to be able to specify a depth that followed A properties to a certain depth. The following command: go-plantuml generate -f model/blahblah.go --depth=1 -o graph.puml would then generate a puml file of both blahblah.go as well as of the first level dependencies of A.

    Another example would be if depth is 2, it would mean that if B had a dependency C we should be able to request issue go-plantuml generate -f model/blahblah.go --depth=2 -o graph.puml and see the relationships of A, B and C.

    opened by lcc 2
  • Could not find class: TPMEventLog for function Add

    Could not find class: TPMEventLog for function Add

    Hello.

    I'm trying to build an UML diagram for this code: https://github.com/9elements/converged-security-suite/pull/330/commits/9e980b2dd18a090ba322592480f5e11882d242ce

    But I receive error Could not find class:

    [[email protected] converged-security-suite]$ go-plantuml generate -o /tmp/1.uml -r -d pkg/bootflow/
    2022/05/26 16:45:59 Could not find class: References for function Bytes
    2022/05/26 16:45:59 Could not find class: StaticData for function Data
    2022/05/26 16:45:59 Could not find class: UEFIGUIDFirst for function Data
    2022/05/26 16:45:59 Could not find class: PCRValues for function Get
    2022/05/26 16:45:59 Could not find class: PCRValues for function Set
    2022/05/26 16:45:59 Could not find class: TPMEventLog for function Add
    2022/05/26 16:45:59 Could not find class: StaticStep for function Actions
    

    What do I do wrong?

    opened by xaionaro 1
  • upgrade: go version 1.18

    upgrade: go version 1.18

    When using go mod tidy in go version 1.17, a problem occurred.

    Log: github.com/bykof/go-plantuml/astParser tested by github.com/bykof/go-plantuml/astParser.test imports github.com/stretchr/testify/assert imports gopkg.in/yaml.v3 tested by gopkg.in/yaml.v3.test imports gopkg.in/check.v1 loaded from gopkg.in/[email protected], but go 1.16 would select v1.0.0-20190902080502-41f04d3bba15

    To upgrade to the versions selected by go 1.16: go mod tidy -go=1.16 && go mod tidy -go=1.17 If reproducibility with go 1.16 is not needed: go mod tidy -compat=1.17 For other options, see: https://golang.org/doc/modules/pruning

    Solve: Upgrade go version to 1.18.

    opened by zouyonghe 0
Owner
Michael Bykovski
C'mon dude, u rly programming java?!
Michael Bykovski
Create beautiful system diagrams with Go

Go-Diagrams Fast and easy application diagrams Go-Diagrams is a loose port of diagrams. Contents Features Usage Features Turn this: d, err := diagram.

null 3.8k Sep 29, 2022
API for generate sequence diagram

Gen-sequence-diagram API for generate sequence diagram Requirements Golang 1.17+ Endpoint Method Router Request Body POST http://localhost:8080/ {"for

Eder Costa 0 Jan 4, 2022
Termbar - Generate terminal charts in Go

termbar Generate terminal bar charts in Go. a: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 50 b: ▇

MergeStat 14 Mar 2, 2022
Tool that can parse Go files into an abstract syntax tree and translate it to several programming languages.

GoDMT GoDMT, the one and only Go Data Model Translator. The goal of this project is to provide a tool that can parse Go files that include var, const,

Josep Jesus Bigorra Algaba 42 Jan 29, 2022
Generate plantuml diagrams from go source files or directories

go-plantuml go-plantuml generates plantuml diagrams from go source files or directories. Installation go get -u github.com/bykof/go-plantuml Please co

Michael Bykovski 264 Sep 30, 2022
Generate PlantUML diagrams from Chrome or Firefox network inspections

hoofli Generate PlantUML diagrams from Chrome or Firefox network inspections This tool reads browser HAR files stored on your local disk and transform

Pascal Dennerly 3 Feb 22, 2022
Create diagrams from the Kubernetes API with go-diagrams.

Kubernetes diagrams k8s-diagrams creates diagrams from your kubernetes clusters. You just have to provide a namespace (or not), and you get a picture

Pierre Erraud 123 Sep 2, 2022
This package provides Go (golang) types and helper functions to do some basic but useful things with mxGraph diagrams in XML, which is most famously used by app.diagrams.net, the new name of draw.io.

Go Draw - Golang MX This package provides types and helper functions to do some basic but useful things with mxGraph diagrams in XML, which is most fa

null 2 Aug 30, 2022
🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

?? Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

Rob Muhlestein 2 Apr 12, 2022
Generate PlantUML ER diagram textual description from PostgreSQL tables

Generate PlantUML ER diagram textual description from PostgreSQL tables

Akira Chiku 474 Sep 28, 2022
erchive is a go program that compresses and encrypts files and entire directories into .zep files (encrypted zip files).

erchive/zep erchive is a go program that compresses and encrypts files and entire directories into .zep files (encrypted zip files). it compresses usi

Christopher Walters 1 May 16, 2022
Generate High Level Cloud Architecture diagrams using YAML syntax.

A commandline tool that generate High Level microservice & serverless Architecture diagrams using a declarative syntax defined in a YAML file.

Luca Sepe 549 Sep 27, 2022
A command line tool to generate sequence diagrams

goseq - text based sequence diagrams A small command line utility used to generate UML sequence diagrams from a text-base definition file. Inspired by

Leon Mika 183 Sep 27, 2022
PlantUML Class Diagram Generator for golang projects

GoPlantUML PlantUML Class Diagram Generator for golang projects. Generates class diagram text compatible with plantuml with the information of all str

Javier Feliu 1.1k Oct 1, 2022
Converts a trace of Datadog to a sequence diagram of PlantUML (Currently, supports only gRPC)

jigsaw Automatically generate a sequence diagram from JSON of Trace in Datadog. ⚠️ Only gRPC calls appear in the sequence diagram. Example w/ response

Yu SERIZAWA 6 Jul 12, 2022
A CLI for generating ER diagrams for Ent schema

enter A CLI for generating ER (entity-relationship) diagrams for Ent schema using mermaid.js.

Ariel Mashraki 95 Sep 13, 2022
Create beautiful system diagrams with Go

Go-Diagrams Fast and easy application diagrams Go-Diagrams is a loose port of diagrams. Contents Features Usage Features Turn this: d, err := diagram.

null 3.8k Sep 29, 2022
Create Mermaid-Js ERD diagrams from existing tables

Mermerd Create Mermaid-Js ERD diagrams from existing tables. Features Supports PostgreSQL and MySQL Select from available schemas Select only the tabl

null 70 Sep 25, 2022
:zap: boilerplate template manager that generates files or directories from template repositories

Boilr Are you doing the same steps over and over again every time you start a new programming project? Boilr is here to help you create projects from

Tamer Tas 1.5k Sep 25, 2022
Utility to compare files/directories with output in html. (like unix diff command)

#godiff A File/Directory diff-like comparison tool with HTML output. This program can be use to compare files and directories for differences. When co

null 42 Sep 15, 2022