util

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotEmptyDir        = errors.New("not empty directory for initialization")
	ErrEmptyProjectName   = 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 initialized demo project.

func ValidateProjectDir

func ValidateProjectDir(dir string) error

ValidateProjectDir ensures the project directory for initialization 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