source

package
v0.0.0-...-edad312 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package source defines the dependency parameters in the 'dev' context. It's used by dependency_manager to articulate with the dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Src

type Src struct {
	Url    string // Remote Url of the source code
	GitUrl string // The Git url derived from the url
	Branch string // Branch to fetch. Leave it empty to get the certain branch.
	// contains filtered or unexported fields
}

The Src struct is used to fetch the source code. It has the optional Branch option. When the Branch is set, then the dependency manager will check out that from remote.

func New

func New(url string, localUrls ...string) (*Src, error)

New dependency by its source code remote url. It can optionally accept the local url if it's not an empty string.

It returns error in the following cases:

  • url is not a web location that could be turned in to the git.
  • localUrl is not a directory with `go.mod` file.

func (*Src) LocalUrl

func (src *Src) LocalUrl() string

func (*Src) SetBranch

func (src *Src) SetBranch(branch string)

SetBranch sets the branch name of the repository.

Jump to

Keyboard shortcuts

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