goconstruct

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README


Go project construction from opinionated templates.

Build Status GoDev License codecov Release

Overview

goconstruct provides a way to construct Go projects from opinionated, templated, components.

My goal with this project, specifically with the templates is to "document" the opinions that I have in the form of templates that can be shared and used by others or minimally, referenced in code reviews. While these opinions are my own, they have absolutely been influenced by the work of others.

Installing

(
  d=$(mktemp -d) cd $d
  go get -u -v github.com/mccurdyc/goconstruct
)

Usage

% goconstruct project -h
USAGE
  project <subcommand>

SUBCOMMANDS
  generate  Generates a new project.

FLAGS
  -config config.toml       A config file defining values for the required variables for all templates used.
  -destination .            The destination directory where the project should be created.
  -templates glue           A comma-separate list of template names.
  -templates-path ./_tmpls  Path to templates.

Contributing

License

FOSSA Status

TODOs

  1. Handle goconstruct with missing subcommands.
  2. GitHub Action for CI (build and test).
  3. Simplify each template so that they are more composable and align with the Unix philosophy of doing one thing.
  4. Backport changes to goconstruct to the template files.
  5. Render templated filenames.
  6. Configurable template delimeters.
  7. Move templates to a separate GitHub repository.
  8. Generate README usage section via Make target or something.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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