ggnew

package
v0.0.0-...-8c930d8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ggnew scaffolds the project gg new creates: the first version of every package the generated main.go imports, so the project compiles before its first generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureFileExists

func EnsureFileExists() ([]string, error)

EnsureFileExists writes every scaffold file missing from the project in the working directory, among them the empty first versions of the files gg gen owns, and returns the paths it created, sorted.

Types

type ProjectFile

type ProjectFile struct {
	Path    string
	Content string
}

ProjectFile is one file a new project starts with: Content goes to Path, relative to the project directory.

func ProjectFiles

func ProjectFiles(projectName string) ([]ProjectFile, error)

ProjectFiles returns the files gg new writes into a new project, in the order it writes them: the scaffold sorted by path, then main.go, .gitignore and config.ini.example. projectName is the module path the project is created under; its last element names the application in the example configuration, as sampleapp does for example.com/sampleapp.

Jump to

Keyboard shortcuts

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