quickgo

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_Blue          = "\033[34m"
	CMD_Cyan          = "\033[36m"
	CMD_BRIGHT_Purple = "\033[35;1m"
	CMD_Purple        = "\033[35m"
	CMD_Red           = "\033[31m"
	CMD_Yellow        = "\033[33m"
	CMD_Bold          = "\033[1m"
	CMD_Underline     = "\033[4m"
	CMD_Reset         = "\033[0m"
)

Variables

This section is empty.

Functions

func ColoredLogWrapper added in v2.2.7

func ColoredLogWrapper(l logger.LogLevel, s string) string

func Craft

func Craft(color, s any) string
func PrintLogo()

Types

type App

type App struct {
	Config        *config.QuickGo `yaml:"config"`        // The configuration for QuickGo.
	ProjectConfig *config.Project `yaml:"projectConfig"` // The configuration for the project.
	Patterns      []string        `yaml:"patterns"`      // The patterns for the templates.
	AppFS         fs.FS           `yaml:"-"`             // The file system for the app, resides in the executable directory.
	ProjectFS     fs.FS           `yaml:"-"`             // The file system for the project, resides in the project (working) directory.
}

func LoadApp

func LoadApp() (*App, error)

func (*App) CopyFileContent

func (a *App) CopyFileContent(proj *config.Project, file *os.File, f *quickfs.FSFile, raw bool) error

func (*App) ListProjects

func (a *App) ListProjects() ([]string, error)

func (*App) LoadProjectConfig

func (a *App) LoadProjectConfig(directory string) (err error)

Load the project configuration from the current working directory.

func (*App) ReadFile

func (a *App) ReadFile(path string) ([]byte, error)

func (*App) ReadProjectConfig

func (a *App) ReadProjectConfig(name string) (proj *config.Project, closeFiles func(), err error)

func (*App) ServeHTTP

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*App) WriteExampleProjectConfig

func (a *App) WriteExampleProjectConfig(directory string) (err error)

Write an example configuration for the user.

func (*App) WriteFile

func (a *App) WriteFile(data []byte, path string) error

func (*App) WriteProject

func (a *App) WriteProject(proj *config.Project, directory string, raw bool) error

func (*App) WriteProjectConfig

func (a *App) WriteProjectConfig(proj *config.Project) error

type ProjectTemplateContext

type ProjectTemplateContext struct {
	Project *config.Project
	File    *quickfs.FSFile
	Dir     *quickfs.FSDirectory
	Content string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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