util

package
v0.13.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProjectYAMLFile     = "project.yaml"
	ProjectYAMLTemplate = `name: %s`
)

Variables

View Source
var (
	ErrNotEmptyDir        = errors.New("the target directory for project creation should be empty")
	ErrProjectNameEmpty   = errors.New("the project name must not be empty")
	ErrProjectNameTooLong = errors.New("the project name must be less than 100 characters")
	ErrProjectNameInvalid = errors.New("the project name can only contain alphanumeric, hyphens, underscores, and periods")
)

Functions

func GetDirAndName

func GetDirAndName() (dir, name string, err error)

GetDirAndName returns the rooted path and the last element of the current working directory for the project to be created.

func ValidateProjectDir

func ValidateProjectDir(dir string) error

ValidateProjectDir ensures the project directory for creation is valid.

func ValidateProjectName

func ValidateProjectName(name string) error

ValidateProjectName ensures a project name is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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