gps

package module
v0.0.0-...-d13d548 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 2 Imported by: 3

README

Go Package Store

Go Reference

Go Package Store displays updates for the Go packages in your GOPATH.

Installation

go install github.com/shurcooL/Go-Package-Store/cmd/Go-Package-Store@latest

Usage

Usage: Go-Package-Store [flags]
       [newline separated packages] | Go-Package-Store -stdin [flags]
  -dep string
    	Determine the list of Go packages from the specified Gopkg.toml file.
  -git-subrepo string
    	Look for Go packages vendored using git-subrepo in the specified vendor directory.
  -godeps string
    	Read the list of Go packages from the specified Godeps.json file.
  -http string
    	Listen for HTTP connections on this address. (default "localhost:7043")
  -stdin
    	Read the list of newline separated Go packages from stdin.

GitHub Access Token:
  To display updates for private repositories on GitHub, or when
  you've exceeded the unauthenticated rate limit, you can provide
  a GitHub access token for Go Package Store to use via the
  GO_PACKAGE_STORE_GITHUB_TOKEN environment variable.

Examples:
  # Check for updates for all Go packages in GOPATH.
  Go-Package-Store

  # Show updates for all golang.org/x/... packages.
  go list golang.org/x/... | Go-Package-Store -stdin

  # Show updates for all dependencies within Gopkg.toml constraints.
  Go-Package-Store -dep=/path/to/repo/Gopkg.toml

  # Show updates for all Go packages vendored using git-subrepo
  # in the specified vendor directory.
  Go-Package-Store -git-subrepo=/path/to/repo/vendor

Development

This package relies on go generate directives to process and statically embed assets. For development only, you may need extra dependencies. You can build and run the package in development mode, where all assets are always read and processed from disk:

go build -tags=dev github.com/shurcooL/Go-Package-Store/cmd/Go-Package-Store

When you're done with development, you should run go generate before committing:

go generate github.com/shurcooL/Go-Package-Store/...

Alternatives

  • GoFresh - Console tool for checking and updating package dependencies (imports).

License

Documentation

Overview

Package gps defines domain types for Go Package Store.

Specifically, it provides a definition of a repository. It defines an interface for a repository presentation, and a presenter type that is capable of creating presentations. Finally, it defines an interface for a repositry updater.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// Root is the import path corresponding to the root of the repository.
	Root string

	// VCS allows getting the state of the VCS.
	VCS vcsstate.VCS
	// Path is the local filesystem path to the repository.
	// It must be set if VCS is not nil.
	Path string
	// Cmd can be used to update this local repository inside a GOPATH workspace.
	// It must be set if VCS is not nil.
	Cmd *vcs.Cmd

	// RemoteVCS allows getting the remote state of the VCS.
	RemoteVCS vcsstate.RemoteVCS
	// RemoteURL is the remote URL, including scheme.
	// It must be set if RemoteVCS is not nil.
	RemoteURL string

	Local struct {
		// RemoteURL is the remote URL, including scheme.
		RemoteURL string

		Revision string // Revision of the default branch (not necessarily the checked out one).
	}
	Remote struct {
		// RepoURL is the repository URL, including scheme, as determined dynamically from the import path.
		RepoURL string

		Branch   string // Default branch, as determined from remote. Only populated if VCS or RemoteVCS is non-nil.
		Revision string // Revision of the default branch.
	}
}

Repo represents the state of a single repository.

func (Repo) ImportPathPattern

func (r Repo) ImportPathPattern() string

ImportPathPattern returns an import path pattern that matches all of the Go packages in this repo. E.g.:

"github.com/owner/repo/..."

type Updater

type Updater interface {
	// Update specified repository to latest version.
	Update(repo *Repo) error
}

Updater is able to update Go packages contained in repositories.

Directories

Path Synopsis
_data
Package assets contains assets for Go Package Store.
Package assets contains assets for Go Package Store.
cmd
Go-Package-Store
Go Package Store displays updates for the Go packages in your GOPATH.
Go Package Store displays updates for the Go packages in your GOPATH.
Package component contains Vecty HTML components used by Go Package Store.
Package component contains Vecty HTML components used by Go Package Store.
Command frontend runs on frontend of Go Package Store.
Command frontend runs on frontend of Go Package Store.
action
Package action defines actions that can be applied to the data model in store.
Package action defines actions that can be applied to the data model in store.
model
Package model is a frontend data model for updates.
Package model is a frontend data model for updates.
store
Package store is a store for updates.
Package store is a store for updates.
Package presenter defines domain types for Go Package Store presenters.
Package presenter defines domain types for Go Package Store presenters.
github
Package github provides a GitHub API-powered presenter.
Package github provides a GitHub API-powered presenter.
gitiles
Package gitiles provides a Gitiles API-powered presenter.
Package gitiles provides a Gitiles API-powered presenter.
Package updater contains gps.Updater implementations.
Package updater contains gps.Updater implementations.
Package workspace contains a pipeline for processing a Go workspace.
Package workspace contains a pipeline for processing a Go workspace.

Jump to

Keyboard shortcuts

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