project

package
v0.0.0-...-d9dc390 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Templates = map[string]map[string]string{
	"Go": {
		"main.go": `package main

import "fmt"

func main() {
	fmt.Println("Hello, World!")
}
`,
		"go.mod": `module {{.Name}}

go 1.21
`,
	},
	"Python": {
		"main.py": `def main():
    print("Hello, World!")

if __name__ == "__main__":
    main()
`,
		"requirements.txt": `# Add your dependencies here
`,
	},
	"Node": {
		"package.json": `{
  "name": "{{.Name}}",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {}
}
`,
		"index.js": `console.log("Hello, World!");
`,
	},
}

Functions

func Generate

func Generate(cfg ProjectConfig) (string, error)

Types

type Manager

type Manager struct {
	Workspace string
}

func NewManager

func NewManager(workspace string) *Manager

func (*Manager) BackupProject

func (m *Manager) BackupProject(srcDir, destPath string) error

func (*Manager) CreateProject

func (m *Manager) CreateProject(name, stack, parentDir string) (string, string, error)

func (*Manager) ExpandPath

func (m *Manager) ExpandPath(path string) string

func (*Manager) SuggestProjectName

func (m *Manager) SuggestProjectName(templateName string) string

func (*Manager) ValidateParentDir

func (m *Manager) ValidateParentDir(path string) (string, error)

type ProjectConfig

type ProjectConfig struct {
	Name      string
	Path      string
	Stack     string
	InitGit   bool
	AddReadme bool
}

Jump to

Keyboard shortcuts

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