repository

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetRepositoryOriginByConfig = func(ctx common.Context, repoConfig *config.Repository) (Repository, error) {

	if repoConfig == nil {
		return nil, fmt.Errorf("missing required config value. name: repository")
	}

	if repoConfig.Local != nil && len(repoConfig.Local.Path) > 0 {
		logger.Debug("Using local anchorfiles repository")
		return local.NewLocalRepository(repoConfig.Local), nil
	} else if repoConfig.Remote != nil {
		logger.Debugf("Using remote anchorfiles repository")
		return remote.NewRemoteRepository(repoConfig.Remote), nil
	}
	return nil, fmt.Errorf("could not resolve anchorfiles local repository path or git tracked remote repository")
}

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Load(ctx common.Context) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳