Skip to content

Commit

Permalink
rename module for local release
Browse files Browse the repository at this point in the history
  • Loading branch information
n-oden committed Jul 8, 2024
1 parent 2438465 commit 5d02fbb
Show file tree
Hide file tree
Showing 17 changed files with 310 additions and 219 deletions.
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ name = "go"
enabled = false

[analyzers.meta]
import_paths = ["github.com/incu6us/goimports-reviser"]
import_paths = ["github.com/odenio/goimports-reviser"]
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -27,9 +25,6 @@ jobs:
run: |
echo GO_VERSION=$(go version | awk '{print $3;}') >> $GITHUB_ENV
- name: Login to Snapcraft
uses: samuelmeuli/action-snapcraft@v2

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
Expand Down
41 changes: 2 additions & 39 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ env:
- GO111MODULE=on
- CGO_ENABLED=0
- PROJECT_NAME=goimports-reviser
- PROJECT_USER=incu6us
- PROJECT_USER=odenio

before:
hooks:
Expand All @@ -28,15 +28,6 @@ builds:
ldflags:
- -s -w -X "main.Tag={{ .Tag }}" -X "main.Commit={{ .FullCommit }}" -X "main.SourceURL={{ .GitURL }}" -X "main.GoVersion={{ .Env.GO_VERSION }}"

- id: goimports-reviser-windows-amd64
binary: goimports-reviser
goos:
- windows
goarch:
- amd64
ldflags:
- -s -w -X "main.Tag={{ .Tag }}" -X "main.Commit={{ .FullCommit }}" -X "main.SourceURL={{ .GitURL }}" -X "main.GoVersion={{ .Env.GO_VERSION }}"

checksum:
name_template: "checksums.txt"

Expand All @@ -53,33 +44,5 @@ changelog:
release:
prerelease: auto
github:
owner: incu6us
owner: odenio
name: goimports-reviser

brews:
- name: goimports-reviser
repository:
owner: incu6us
name: homebrew-tap
url_template: "https://github.com/{{ .Env.PROJECT_USER }}/{{ .ProjectName }}/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: incu6us
email: vyacheslavpryimak@gmail.com
folder: Formula
homepage: "https://github.com/incu6us/goimports-reviser"
description: "Right imports sorting & code formatting tool"
test: |
system "#{bin}/goimports-reviser -version"
install: |
bin.install "goimports-reviser"
snapcrafts:
- id: goimports-reviser
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
publish: true
summary: "Right imports sorting & code formatting tool"
description: |
Tool for Golang to sort goimports by 3 groups: std, general and project dependencies. Also, formatting for your code will be prepared(so, you don't need to use gofmt or goimports separately).
grade: stable
confinement: strict
license: MIT
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ build-macos-amd64:

.PHONY: update-std-package-list
update-std-package-list:
@go run -tags gen github.com/incu6us/goimports-reviser/v3/pkg/std/gen
@go run -tags gen github.com/odenio/goimports-reviser/v3/pkg/std/gen
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

---

# goimports-reviser [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Right%20golang%20imports%20sorting%20and%20code%20formatting%20tool%20(goimports%20alternative)&url=https://github.com/incu6us/goimports-reviser&hashtags=golang,code,goimports-reviser,goimports,gofmt,developers)
# goimports-reviser [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Right%20golang%20imports%20sorting%20and%20code%20formatting%20tool%20(goimports%20alternative)&url=https://github.com/odenio/goimports-reviser&hashtags=golang,code,goimports-reviser,goimports,gofmt,developers)
[![#StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://vshymanskyy.github.io/StandWithUkraine)
!['Status Badge'](https://github.com/incu6us/goimports-reviser/workflows/build/badge.svg)
!['Release Badge'](https://github.com/incu6us/goimports-reviser/workflows/release/badge.svg)
!['Quality Badge'](https://goreportcard.com/badge/github.com/incu6us/goimports-reviser)
[![codecov](https://codecov.io/gh/incu6us/goimports-reviser/branch/master/graph/badge.svg)](https://codecov.io/gh/incu6us/goimports-reviser)
![GitHub All Releases](https://img.shields.io/github/downloads/incu6us/goimports-reviser/total?color=green)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/incu6us/goimports-reviser?color=green)
!['Status Badge'](https://github.com/odenio/goimports-reviser/workflows/build/badge.svg)
!['Release Badge'](https://github.com/odenio/goimports-reviser/workflows/release/badge.svg)
!['Quality Badge'](https://goreportcard.com/badge/github.com/odenio/goimports-reviser)
[![codecov](https://codecov.io/gh/odenio/goimports-reviser/branch/master/graph/badge.svg)](https://codecov.io/gh/odenio/goimports-reviser)
![GitHub All Releases](https://img.shields.io/github/downloads/odenio/goimports-reviser/total?color=green)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/odenio/goimports-reviser?color=green)
[![goimports-reviser](https://snapcraft.io//goimports-reviser/badge.svg)](https://snapcraft.io/goimports-reviser)
![license](https://img.shields.io/github/license/incu6us/goimports-reviser)
![license](https://img.shields.io/github/license/odenio/goimports-reviser)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)

<a href="https://www.buymeacoffee.com/slavka" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;"></a>
Expand Down Expand Up @@ -84,7 +84,7 @@ Usage of goimports-reviser:
-output string
Can be "file", "write" or "stdout". Whether to write the formatted content back to the file or to stdout. When "write" together with "-list-diff" will list the file name and write back to the file. Optional parameter. (default "file")
-project-name string
Your project name(ex.: github.com/incu6us/goimports-reviser). Optional parameter.
Your project name(ex.: github.com/odenio/goimports-reviser). Optional parameter.
-recursive
Apply rules recursively if target is a directory. In case of ./... execution will be recursively applied by default. Optional parameter.
-rm-unused
Expand All @@ -104,13 +104,13 @@ Usage of goimports-reviser:
## Install
### With Go
```bash
go install -v github.com/incu6us/goimports-reviser/v3@latest
go install -v github.com/odenio/goimports-reviser/v3@latest
```

### With Brew
```bash
brew tap incu6us/homebrew-tap
brew install incu6us/homebrew-tap/goimports-reviser
brew tap odenio/homebrew-tap
brew install odenio/homebrew-tap/goimports-reviser
```

### With Snap
Expand All @@ -126,7 +126,7 @@ package testdata
import (
"log"

"github.com/incu6us/goimports-reviser/testdata/innderpkg"
"github.com/odenio/goimports-reviser/testdata/innderpkg"

"bytes"

Expand All @@ -144,7 +144,7 @@ import (

"golang.org/x/exp/slices"

"github.com/incu6us/goimports-reviser/testdata/innderpkg"
"github.com/odenio/goimports-reviser/testdata/innderpkg"
)
```

Expand All @@ -167,7 +167,7 @@ package testdata // goimports-reviser/testdata
import (
"fmt" //fmt package
"golang.org/x/exp/slices" //custom package
"github.com/incu6us/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization
"github.com/odenio/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization
"goimports-reviser/pkg"
)
```
Expand All @@ -181,7 +181,7 @@ import (

"golang.org/x/exp/slices" // custom package

"github.com/incu6us/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization
"github.com/odenio/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization

"goimports-reviser/pkg"
)
Expand All @@ -199,7 +199,7 @@ import (
. "github.com/pkg2"
"fmt" //fmt package
"golang.org/x/exp/slices" //custom package
"github.com/incu6us/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization
"github.com/odenio/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization
"goimports-reviser/pkg"
)
```
Expand All @@ -213,7 +213,7 @@ import (

"golang.org/x/exp/slices" // custom package

"github.com/incu6us/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization
"github.com/odenio/goimports-reviser/pkg" // this is a company package which is not a part of the project, but is a part of your organization

"goimports-reviser/pkg"

Expand Down Expand Up @@ -254,7 +254,7 @@ package testdata // goimports-reviser/testdata

import (
"fmt"
"github.com/incu6us/goimports-reviser/pkg"
"github.com/odenio/goimports-reviser/pkg"
extpkg "google.com/golang/pkg"
"golang.org/x/exp/slices"
extslice "github.com/PeterRK/slices"
Expand All @@ -268,7 +268,7 @@ package testdata // goimports-reviser/testdata
import (
"fmt"

"github.com/incu6us/goimports-reviser/pkg"
"github.com/odenio/goimports-reviser/pkg"
"golang.org/x/exp/slices"

extpkg "google.com/golang/pkg"
Expand All @@ -283,5 +283,5 @@ If you like or are using this project, please give it a **star**.

### Stargazers

[![Stargazers over time](https://starchart.cc/incu6us/goimports-reviser.svg)](https://starchart.cc/incu6us/goimports-reviser)
[![Stargazers over time](https://starchart.cc/odenio/goimports-reviser.svg)](https://starchart.cc/odenio/goimports-reviser)

6 changes: 3 additions & 3 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// It will help you to keep your code cleaner.
//
// Example:
// goimports-reviser -project-name github.com/incu6us/goimports-reviser -file-path ./reviser/reviser.go -rm-unused
// goimports-reviser -project-name github.com/odenio/goimports-reviser -file-path ./reviser/reviser.go -rm-unused
//
// Input:
// import (
// "log"
//
// "github.com/incu6us/goimports-reviser/testdata/innderpkg"
// "github.com/odenio/goimports-reviser/testdata/innderpkg"
//
// "bytes"
//
Expand All @@ -23,7 +23,7 @@
//
// "golang.org/x/exp/slices"
//
// "github.com/incu6us/goimports-reviser/testdata/innderpkg"
// "github.com/odenio/goimports-reviser/testdata/innderpkg"
// )
//
// If you need to set package names explicitly(in import declaration), you can use additional option `-set-alias`.
Expand Down
16 changes: 15 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/incu6us/goimports-reviser/v3
module github.com/odenio/goimports-reviser/v3

go 1.21

Expand All @@ -10,10 +10,24 @@ require (
)

require (
github.com/codemodus/kace v0.5.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-pg/pg/v9 v9.2.1 // indirect
github.com/go-pg/zerochecker v0.2.0 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/segmentio/encoding v0.1.15 // indirect
github.com/vmihailenco/bufpool v0.1.11 // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
mellium.im/sasl v0.2.1 // indirect
)
Loading

0 comments on commit 5d02fbb

Please sign in to comment.