Skip to content

Releases: loov/goda

Module information for packages

04 Mar 08:34
Compare
Choose a tag to compare

It's now possible to use Module information, when available, for formatting labels.

As an example:

goda list -f "{{.ID}}{{with .Module.Version}}@{{.}}{{end}}" ./...:all

Fix "a b" and "a + b" difference

21 Jan 08:22
Compare
Choose a tag to compare

Fixes a bug with "goda graph alpha beta" being handled differently from "goda graph alpha + beta".

This release also includes an experimental "goda weight-diff binary1 binary2" to diff the symbol sizes between binaries. This command might be removed in the future.

`:test` and selector prefix `+-`

14 Apr 16:58
Compare
Choose a tag to compare

This release introduces new syntax for tests and shorthand for operations.

Selector prefix X:+S is a shorthand for X + X:S and X:-S is a shorthand for X - X:S.

// To select test packages (currently only within the current module)
X:test

// To select packages and including test packages:
X:+test

// To remove main packages:
X:-test

// To remove source packages (previously `X:nosource`):
X:-source

Breaking, rename :deps to :import

24 Mar 17:59
Compare
Choose a tag to compare

Currently :deps is slightly ambiguous, instead use :import that makes it clearer. For convenience there's a shorthand :imp.

To select all dependencies you can use :import:all.

Breaking change, default behavior is `:root`

24 Mar 12:12
Compare
Choose a tag to compare
  • removes :root, this is the default behavior when specifying packages
  • removes :noroot, and replaces it with :deps
  • adds :all, to select all the dependencies
  • adds :main, to select main pacakges

When using the expression syntax, the first usage is often to target
all the roots and the dependencies... however most subtractions use
:root.

Usage before:

goda graph X - golang.org/x/tools/...:root - github.com/xyz/...:root

Usage after:

goda graph X:all - golang.org/x/tools/... - github.com/xyz/...

New graph types and expressions

06 Mar 12:57
Compare
Choose a tag to compare

New expression:

  • incoming(X, Y) - packages from X that directly import a package in Y

New option for goda graph -type flag:

  • tgf - Trivial Graph Format, which is one of the simplest graph formats.
  • graphml - GraphML comprehensive format that can be used together with tools like yEd.
  • digraph - that can be used together with digraph tool.
  • edges - outputs each import edge on a separate line, can be useful grepping.

Label formatting has two new utility functions, which help to make the graph/list labels shorter:

  • {{ .ID | rel "github.com/loov/goda" }}, uses relative names for packages starting with "github.com/loov/goda".
  • {{ .ID | rename "github.com" "$gh" }}, renames package path "github.com" with "$gh", as an example "github.com/loov/goda" would be renamed to "$gh/loov/goda".

Aligned list and cut output

30 Dec 08:38
Compare
Choose a tag to compare
v0.2.1

{cut,list}: add tab alignment

Simplified internals

29 Dec 10:47
Compare
Choose a tag to compare

The internal logic how stats was changed to allow for more flexible analysis. It's now possible to get stats about upstream and downstream packages.

This also means that some template functions were removed. They can be replaced as:

  • {{ LineCount . }} -> {{ .Go.Lines }}
  • {{ SourceSize . }} -> {{ .AllFiles.Size }}
  • {{ DeclCount . }}-> {{ .Decls }}
  • {{ TokenCount . }} -> {{ .Tokens }}