Discover Packages
github.com/briancsparks/ript
module
Version:
v0.0.0-...-f90db61
Opens a new window with list of versions in this module.
Published: Sep 6, 2022
License: MIT
Opens a new window with license information.
README
README
¶
Hello Fooprojectname
TODO: version number
(And how to do isActiveDevelopment)
You can use the linker to set variables inside the app.
See:
Explaining how the Go build tool helps for this
Lots of examples
Article(s)
Ript is Replace-In-File sans the Template Engine
Template engines are great, but are overkill in many situations. If you don't need the power -
like when generating a project's files - it is convenient to just have files - sans template engine.
For example, consider this Go file:
package riptprojectname
/* Copyright © 2022 RIPTENV_IMFO_USER_IRL_NAME <RIPTENV_IMFO_GITHUB_USEREMAIL> -- MIT (see LICENSE file) */
import "github.com/RIPTENV_IMFO_GITHUB_USERNAME/riptprojectname/cmd"
func main() {
cmd.Execute()
}
Tools can parse 100% of the file
No getting tripped up on the template engine's markup.
All the items that start ript
will be replaced with a simple text replacement.
All your template files are valid as-is, so all your tools will work with them.
Simple Rules
Any tokens that start RIPTENV_
will be replaced by that environment variable.
If it is absent in the environment, a default is read from a YAML config file.
Any tokens that start ript
are replaced by whatever the user entered on the
command-line.
Expand ▾
Collapse ▴
Directories
¶
Click to show internal directories.
Click to hide internal directories.