Skip to content

chore: call to action #5519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
github.com/butuzov/mirror v1.3.0
github.com/catenacyber/perfsprint v0.8.1
github.com/charithe/durationcheck v0.0.10
github.com/charmbracelet/lipgloss v1.0.0
github.com/ckaznocha/intrange v0.3.0
github.com/curioswitch/go-reassign v0.3.0
github.com/daixiang0/gci v0.13.5
Expand Down Expand Up @@ -136,9 +137,11 @@ require (

require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/charmbracelet/x/ansi v0.4.2 // indirect
github.com/chavacava/garif v0.1.0 // indirect
github.com/dave/dst v0.27.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -164,12 +167,14 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
10 changes: 10 additions & 0 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions pkg/commands/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/charmbracelet/lipgloss"
"github.com/fatih/color"
"github.com/santhosh-tekuri/jsonschema/v6"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -126,6 +127,8 @@ func (c *migrateCommand) execute(_ *cobra.Command, _ []string) error {

c.log.Infof("Migration done: %s", dstPath)

callForAction(c.cmd)

return nil
}

Expand Down Expand Up @@ -218,3 +221,22 @@ func saveNewConfiguration(cfg any, dstPath string) error {

return parser.Encode(cfg, dstFile)
}

func callForAction(cmd *cobra.Command) {
pStyle := lipgloss.NewStyle().
Padding(1).
BorderStyle(lipgloss.RoundedBorder()).
BorderForeground(lipgloss.Color("161")).
Align(lipgloss.Center)

hStyle := lipgloss.NewStyle().Bold(true)

s := fmt.Sprintln(hStyle.Render("We need you!"))
s += `
Donations help fund the ongoing development and maintenance of this tool.
If golangci-lint has been useful to you, please consider contributing.

Donate now: https://donate.golangci.org`

cmd.Println(pStyle.Render(s))
}
Loading