update

package module
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

go-mod-update

Utility for updating Golang go.mod projects.

INSTALLATION

> go install github.com/go-curses/coreutils-go-mod-update/cmd/go-mod-update@latest

DOCUMENTATION

> go-mod-update --help
NAME:
   go-mod-update - go.mod update

USAGE:
   go-mod-update [options] [/source/paths ...]

VERSION:
   v0.2.4 (trunk)

DESCRIPTION:
   command line utility for updating golang dependencies

GLOBAL OPTIONS:
   --direct, -d               specify the GOPROXY setting of "direct" (overrides --goproxy) (default: false) [$GO_MOD_UPDATE_GOPROXY_DIRECT]
   --goproxy value, -p value  specify the GOPROXY setting to use (default: "https://proxy.golang.org,direct") [$GO_MOD_UPDATE_GOPROXY]
   --tidy, -t                 run "go mod tidy" after updates (default: false) [$GO_MOD_UPDATE_TIDY]
   --help, -h, --usage        display command-line usage information (default: false)
   --version, -v              display the version (default: false)

LICENSE

Copyright 2023  The Go-Curses Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use file except in compliance with the License.
You may obtain a copy of the license at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopDiscovery

func StopDiscovery() (err error)

func Tidy added in v0.2.0

func Tidy(path string, goProxy string) (err error)

func Update

func Update(module *Module, goProxy string)

func Version

func Version(v *semver.Version) (version string)

Types

type Module

type Module struct {
	Path string
	Name string
	This *semver.Version
	Next *semver.Version
	Pick bool
	Done bool
	Err  error
}

func NewModule

func NewModule(path, name, this, next string) (m *Module)

func (Module) NextVer

func (m Module) NextVer() (version string)

func (Module) String

func (m Module) String() (line string)

func (Module) ThisVer

func (m Module) ThisVer() (version string)

type Modules

type Modules []*Module

func StartDiscovery

func StartDiscovery(path string, goProxy string) (modules Modules, err error)

func (Modules) Pending

func (m Modules) Pending() (count int)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL