base

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModulePath

func ModulePath(filename string) (string, error)

ModulePath returns go module path.

func Tree

func Tree(path string, dir string)

Types

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

Repo is git repository manager.

func NewRepo

func NewRepo(url string, branch string) *Repo

NewRepo new a repository manager.

func (*Repo) Clone

func (r *Repo) Clone(ctx context.Context) error

Clone clones the repository to cache path.

func (*Repo) CopyTo

func (r *Repo) CopyTo(ctx context.Context, to string, modPath string, ignores []string) error

CopyTo copies the repository to project path.

func (*Repo) CopyToApiProto

func (r *Repo) CopyToApiProto(ctx context.Context, from, to string, ignores, replaces []string) error

CopyToApiProto copies the repository to api proto path

func (*Repo) CopyToV2

func (r *Repo) CopyToV2(ctx context.Context, from, to string, modPath string, ignores, replaces []string) error

CopyToV2 copies the repository to project path

func (*Repo) Path

func (r *Repo) Path() string

Path returns the repository cache path.

func (*Repo) Pull

func (r *Repo) Pull(ctx context.Context) error

Pull fetch the repository from remote url.

Jump to

Keyboard shortcuts

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