forked from Plemya-x/ALR
lint: run make fmt
This commit is contained in:
parent
df87bfcc63
commit
cfb3764412
1
build.go
1
build.go
@ -23,6 +23,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/osutils"
|
||||
"plemya-x.ru/alr/internal/types"
|
||||
|
1
fix.go
1
fix.go
@ -22,6 +22,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
|
1
gen.go
1
gen.go
@ -4,6 +4,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"plemya-x.ru/alr/pkg/gen"
|
||||
)
|
||||
|
||||
|
@ -6,12 +6,13 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
|
||||
"plemya-x.ru/alr/internal/cpu"
|
||||
"plemya-x.ru/alr/internal/shutils/helpers"
|
||||
"plemya-x.ru/alr/pkg/distro"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
)
|
||||
|
||||
var helperCmd = &cli.Command{
|
||||
|
3
info.go
3
info.go
@ -23,13 +23,14 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"plemya-x.ru/alr/internal/cliutils"
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/overrides"
|
||||
"plemya-x.ru/alr/pkg/distro"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"plemya-x.ru/alr/pkg/repos"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
var infoCmd = &cli.Command{
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"plemya-x.ru/alr/internal/cliutils"
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/internal/pager"
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
|
||||
"plemya-x.ru/alr/internal/types"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
|
@ -24,8 +24,9 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -25,6 +25,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
|
||||
|
@ -28,10 +28,11 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"golang.org/x/exp/slices"
|
||||
"modernc.org/sqlite"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
|
||||
// CurrentVersion is the current version of the database.
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
// Пакет dl содержит абстракции для загрузки файлов и каталогов
|
||||
// из различных источников.
|
||||
@ -39,6 +39,7 @@ import (
|
||||
"golang.org/x/crypto/blake2b"
|
||||
"golang.org/x/crypto/blake2s"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"plemya-x.ru/alr/internal/dlcache"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
@ -299,8 +300,6 @@ func linkDir(src, dest string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
|
||||
rel, err := filepath.Rel(src, path)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -33,6 +33,7 @@ import (
|
||||
|
||||
"github.com/mholt/archiver/v4"
|
||||
"github.com/schollz/progressbar/v3"
|
||||
|
||||
"plemya-x.ru/alr/internal/shutils/handlers"
|
||||
)
|
||||
|
||||
|
@ -22,11 +22,12 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"plemya-x.ru/alr/internal/cpu"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/pkg/distro"
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
type Opts struct {
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"plemya-x.ru/alr/internal/overrides"
|
||||
"plemya-x.ru/alr/pkg/distro"
|
||||
"golang.org/x/exp/slices"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
"mvdan.cc/sh/v3/syntax"
|
||||
|
||||
"plemya-x.ru/alr/internal/overrides"
|
||||
"plemya-x.ru/alr/pkg/distro"
|
||||
)
|
||||
|
||||
var ErrNotPointerToStruct = errors.New("val must be a pointer to a struct")
|
||||
|
@ -10,9 +10,9 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"plemya-x.ru/fakeroot"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
"plemya-x.ru/fakeroot"
|
||||
)
|
||||
|
||||
// FakerootExecHandler was extracted from github.com/mvdan/sh/interp/handler.go
|
||||
|
@ -31,8 +31,9 @@ import (
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/plumbing/object"
|
||||
"golang.org/x/exp/slices"
|
||||
"plemya-x.ru/alr/internal/shutils/handlers"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
|
||||
"plemya-x.ru/alr/internal/shutils/handlers"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -24,9 +24,10 @@ import (
|
||||
"sync"
|
||||
|
||||
"go.elara.ws/logger"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"go.elara.ws/translate"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
|
||||
//go:embed files
|
||||
|
3
list.go
3
list.go
@ -22,12 +22,13 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"plemya-x.ru/alr/pkg/manager"
|
||||
"plemya-x.ru/alr/pkg/repos"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var listCmd = &cli.Command{
|
||||
|
1
main.go
1
main.go
@ -28,6 +28,7 @@ import (
|
||||
"github.com/mattn/go-isatty"
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.elara.ws/logger"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/internal/translations"
|
||||
|
@ -52,6 +52,7 @@ import (
|
||||
|
||||
"github.com/goreleaser/nfpm/v2"
|
||||
"github.com/goreleaser/nfpm/v2/files"
|
||||
|
||||
"plemya-x.ru/alr/internal/cliutils"
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/cpu"
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/goreleaser/nfpm/v2"
|
||||
|
||||
"plemya-x.ru/alr/internal/types"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
)
|
||||
|
@ -23,10 +23,11 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"plemya-x.ru/alr/internal/shutils/handlers"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
"mvdan.cc/sh/v3/syntax"
|
||||
|
||||
"plemya-x.ru/alr/internal/shutils/handlers"
|
||||
)
|
||||
|
||||
// OSRelease contains information from an os-release file
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
|
||||
// Используем директиву //go:embed для встраивания содержимого файла шаблона в строку pipTmpl
|
||||
// Встраивание файла tmpls/pip.tmpl.sh
|
||||
//
|
||||
//go:embed tmpls/pip.tmpl.sh
|
||||
var pipTmpl string
|
||||
|
||||
|
@ -107,6 +107,7 @@ func (a *APTRpm) UpgradeAll(opts *Opts) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (y *APTRpm) ListInstalled(opts *Opts) (map[string]string, error) {
|
||||
out := map[string]string{}
|
||||
cmd := exec.Command("rpm", "-qa", "--queryformat", "%{NAME}\u200b%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}\\n")
|
||||
|
@ -35,6 +35,10 @@ import (
|
||||
"github.com/go-git/go-git/v5/plumbing/format/diff"
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
"go.elara.ws/vercmp"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
"mvdan.cc/sh/v3/syntax"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/internal/shutils/decoder"
|
||||
@ -42,9 +46,6 @@ import (
|
||||
"plemya-x.ru/alr/internal/types"
|
||||
"plemya-x.ru/alr/pkg/distro"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"mvdan.cc/sh/v3/expand"
|
||||
"mvdan.cc/sh/v3/interp"
|
||||
"mvdan.cc/sh/v3/syntax"
|
||||
)
|
||||
|
||||
// Pull pulls the provided repositories. If a repo doesn't exist, it will be cloned
|
||||
|
3
repo.go
3
repo.go
@ -24,12 +24,13 @@ import (
|
||||
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/internal/types"
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"plemya-x.ru/alr/pkg/repos"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var addrepoCmd = &cli.Command{
|
||||
|
@ -23,6 +23,10 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.elara.ws/vercmp"
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"plemya-x.ru/alr/internal/config"
|
||||
"plemya-x.ru/alr/internal/db"
|
||||
"plemya-x.ru/alr/internal/types"
|
||||
@ -31,9 +35,6 @@ import (
|
||||
"plemya-x.ru/alr/pkg/loggerctx"
|
||||
"plemya-x.ru/alr/pkg/manager"
|
||||
"plemya-x.ru/alr/pkg/repos"
|
||||
"go.elara.ws/vercmp"
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var upgradeCmd = &cli.Command{
|
||||
|
Loading…
Reference in New Issue
Block a user