From 448e12ce38128909c32f30b29dc560ac44d1d7a5 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Thu, 7 May 2020 01:09:31 +0000 Subject: [PATCH] Imp formatting (#17) Ran imp Signed-off-by: jolheiser Co-authored-by: jolheiser Reviewed-on: https://gitea.com/jolheiser/sip/pulls/17 --- cmd/cmd.go | 6 ++++-- cmd/config.go | 1 + cmd/issues.go | 10 ++++++---- cmd/issues_create.go | 4 +++- cmd/pulls_checkout.go | 10 ++++++---- cmd/pulls_create.go | 4 +++- cmd/pulls_status.go | 6 ++++-- cmd/release.go | 6 ++++-- cmd/release_create.go | 4 +++- cmd/repo.go | 6 ++++-- cmd/repo_create.go | 3 ++- cmd/token.go | 1 + cmd/token_add.go | 4 +++- cmd/token_remove.go | 2 ++ main.go | 4 +++- modules/config/config.go | 5 +++-- modules/markdown/markdown.go | 3 ++- modules/sdk/issues.go | 6 ++++-- 18 files changed, 58 insertions(+), 27 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index f3e1f02..0b77f0f 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,15 +1,17 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "errors" "fmt" + "sync" + "gitea.com/jolheiser/sip/modules/config" "gitea.com/jolheiser/sip/modules/git" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver/color" - "sync" ) var ( diff --git a/cmd/config.go b/cmd/config.go index 58477f3..4942970 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -2,6 +2,7 @@ package cmd import ( "gitea.com/jolheiser/sip/modules/config" + "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" diff --git a/cmd/issues.go b/cmd/issues.go index 34ea414..eec4691 100644 --- a/cmd/issues.go +++ b/cmd/issues.go @@ -1,19 +1,21 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "errors" "fmt" + "os" + "strconv" + "strings" + "gitea.com/jolheiser/sip/modules/csv" "gitea.com/jolheiser/sip/modules/markdown" "gitea.com/jolheiser/sip/modules/sdk" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" "go.jolheiser.com/beaver/color" - "os" - "strconv" - "strings" ) var Issues = cli.Command{ diff --git a/cmd/issues_create.go b/cmd/issues_create.go index 7818fa5..72c655c 100644 --- a/cmd/issues_create.go +++ b/cmd/issues_create.go @@ -1,9 +1,11 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "fmt" + "gitea.com/jolheiser/sip/modules/markdown" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver/color" diff --git a/cmd/pulls_checkout.go b/cmd/pulls_checkout.go index c13807e..64adfe5 100644 --- a/cmd/pulls_checkout.go +++ b/cmd/pulls_checkout.go @@ -1,17 +1,19 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "errors" "fmt" + "os" + "os/exec" + "strconv" + "gitea.com/jolheiser/sip/modules/config" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/huandu/xstrings" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" - "os" - "os/exec" - "strconv" ) var PullsCheckout = cli.Command{ diff --git a/cmd/pulls_create.go b/cmd/pulls_create.go index cf0867e..a26a6bb 100644 --- a/cmd/pulls_create.go +++ b/cmd/pulls_create.go @@ -1,10 +1,12 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "fmt" + "gitea.com/jolheiser/sip/modules/git" "gitea.com/jolheiser/sip/modules/markdown" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver/color" diff --git a/cmd/pulls_status.go b/cmd/pulls_status.go index a38c611..52614b6 100644 --- a/cmd/pulls_status.go +++ b/cmd/pulls_status.go @@ -1,13 +1,15 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "fmt" + "strconv" + "gitea.com/jolheiser/sip/modules/git" "gitea.com/jolheiser/sip/modules/sdk" + + "code.gitea.io/sdk/gitea" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver/color" - "strconv" ) var PullsStatus = cli.Command{ diff --git a/cmd/release.go b/cmd/release.go index 320a65d..b1a7e8f 100644 --- a/cmd/release.go +++ b/cmd/release.go @@ -1,14 +1,16 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "fmt" + "os" + "gitea.com/jolheiser/sip/modules/csv" "gitea.com/jolheiser/sip/modules/markdown" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver/color" - "os" ) var Release = cli.Command{ diff --git a/cmd/release_create.go b/cmd/release_create.go index 27bc2a6..e163c48 100644 --- a/cmd/release_create.go +++ b/cmd/release_create.go @@ -1,9 +1,11 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "fmt" + "gitea.com/jolheiser/sip/modules/git" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver/color" diff --git a/cmd/repo.go b/cmd/repo.go index 4e514fa..a6da644 100644 --- a/cmd/repo.go +++ b/cmd/repo.go @@ -1,12 +1,14 @@ package cmd import ( - "code.gitea.io/sdk/gitea" + "strconv" + "gitea.com/jolheiser/sip/modules/sdk" + + "code.gitea.io/sdk/gitea" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" "go.jolheiser.com/beaver/color" - "strconv" ) var Repo = cli.Command{ diff --git a/cmd/repo_create.go b/cmd/repo_create.go index 4b591fc..ac4e456 100644 --- a/cmd/repo_create.go +++ b/cmd/repo_create.go @@ -1,12 +1,13 @@ package cmd import ( + "strings" + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" "go.jolheiser.com/beaver/color" - "strings" ) var RepoCreate = cli.Command{ diff --git a/cmd/token.go b/cmd/token.go index 14e2aa1..4a2b8b2 100644 --- a/cmd/token.go +++ b/cmd/token.go @@ -2,6 +2,7 @@ package cmd import ( "gitea.com/jolheiser/sip/modules/config" + "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" "go.jolheiser.com/beaver/color" diff --git a/cmd/token_add.go b/cmd/token_add.go index 02d2f60..ea7f094 100644 --- a/cmd/token_add.go +++ b/cmd/token_add.go @@ -1,9 +1,11 @@ package cmd import ( - "code.gitea.io/sdk/gitea" "errors" + "gitea.com/jolheiser/sip/modules/config" + + "code.gitea.io/sdk/gitea" "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" diff --git a/cmd/token_remove.go b/cmd/token_remove.go index faad8ce..ca534e6 100644 --- a/cmd/token_remove.go +++ b/cmd/token_remove.go @@ -2,7 +2,9 @@ package cmd import ( "fmt" + "gitea.com/jolheiser/sip/modules/config" + "github.com/AlecAivazis/survey/v2" "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" diff --git a/main.go b/main.go index 1edc83e..4f37477 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,12 @@ package main import ( + "os" + "gitea.com/jolheiser/sip/cmd" + "github.com/urfave/cli/v2" "go.jolheiser.com/beaver" - "os" ) var Version = "develop" diff --git a/modules/config/config.go b/modules/config/config.go index 5079002..f291b7c 100644 --- a/modules/config/config.go +++ b/modules/config/config.go @@ -2,11 +2,12 @@ package config import ( "fmt" + "os" + "path" + "github.com/BurntSushi/toml" "github.com/mitchellh/go-homedir" "go.jolheiser.com/beaver" - "os" - "path" ) var ( diff --git a/modules/markdown/markdown.go b/modules/markdown/markdown.go index 1336f74..203958d 100644 --- a/modules/markdown/markdown.go +++ b/modules/markdown/markdown.go @@ -1,9 +1,10 @@ package markdown import ( + "strings" + "github.com/charmbracelet/glamour" "github.com/kyokomi/emoji" - "strings" ) func normalizeNewlines(s string) string { diff --git a/modules/sdk/issues.go b/modules/sdk/issues.go index b22b98f..fa9c7fd 100644 --- a/modules/sdk/issues.go +++ b/modules/sdk/issues.go @@ -1,9 +1,11 @@ package sdk import ( - "code.gitea.io/sdk/gitea" - "gitea.com/jolheiser/sip/modules/qualify" "strings" + + "gitea.com/jolheiser/sip/modules/qualify" + + "code.gitea.io/sdk/gitea" ) // GetIssues returns all matching Issues from a Gitea instance