adapters

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCmd

func RunCmd(ctx context.Context, dir string, command string, commandParams ...string) (string, error)

RunCmd shell command. Running git mod, for example. inpsired by cmd/go/internal/modfetch/codehost/codehost.go:318:Run from go mod But go mod function looks too complicated so for PoC/MVP I decided to implement simpler solution

func SanitizePath added in v0.4.5

func SanitizePath(source string) string

SanitizePath replace `/` with `-` to prevent troubles with creating files/dirs for modules that have '/' in version

Types

type RunError

type RunError struct {
	Command       string
	CommandParams []string
	Dir           string
	Err           error
	Stderr        string
}

func (RunError) Error

func (e RunError) Error() string

Directories

Path Synopsis
git

Jump to

Keyboard shortcuts

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