goutils

package
v2.56.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArtifactoryRemoteRepoUrl added in v2.29.8

func GetArtifactoryRemoteRepoUrl(serverDetails *config.ServerDetails, repo string, goProxyParams GoProxyUrlParams) (string, error)

func GetGoModCachePath

func GetGoModCachePath() (string, error)

func GetModuleName

func GetModuleName(projectDir string) (string, error)

func GetProjectRoot

func GetProjectRoot() (string, error)

func LogGoVersion

func LogGoVersion() error

Types

type GoCmdConfig added in v2.7.4

type GoCmdConfig struct {
	Go           string
	Command      []string
	CommandFlags []string
	Dir          string
	StrWriter    io.WriteCloser
	ErrWriter    io.WriteCloser
}

func NewGoCmdConfig added in v2.7.4

func NewGoCmdConfig() (*GoCmdConfig, error)

func (*GoCmdConfig) GetCmd added in v2.7.4

func (config *GoCmdConfig) GetCmd() (cmd *exec.Cmd)

func (*GoCmdConfig) GetEnv added in v2.7.4

func (config *GoCmdConfig) GetEnv() map[string]string

func (*GoCmdConfig) GetErrWriter added in v2.7.4

func (config *GoCmdConfig) GetErrWriter() io.WriteCloser

func (*GoCmdConfig) GetStdWriter added in v2.7.4

func (config *GoCmdConfig) GetStdWriter() io.WriteCloser

type GoProxyUrlParams added in v2.53.1

type GoProxyUrlParams struct {
	// Fallback to retrieve the modules directly from the source if
	// the module failed to be retrieved from the proxy.
	// add |direct to the end of the url.
	// example: https://gocenter.io|direct
	Direct bool
	// The path from baseUrl to the standard Go repository path
	// URL structure: <baseUrl>/<EndpointPrefix>/api/go/<repoName>
	EndpointPrefix string
}

func (*GoProxyUrlParams) BuildUrl added in v2.53.1

func (gdu *GoProxyUrlParams) BuildUrl(url *url.URL, repoName string) string

Jump to

Keyboard shortcuts

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