Goplater is a Go commandline programm that helps you template your files.
Download the latest binary from the Release page.
Make it executable with chmod +x goplater and run it for the first time.
Use the goplater template command to template files:
./goplater template TEMPLATE.md -o README.mdThis will create a new file called README.md in your current working directory.
Take a look at this TEMPLATE.md file:
Wow, look at this incredible file... 🥳{{{ #://examples/fs/INCREDIBLE.md }}}
You want the `docker-compose.yaml` file for Secured Signal API?
Really? Here you go:{{{ @://https://raw.githubusercontent.com/CodeShellDev/secured-signal-api/refs/heads/main/docker-compose.yaml }}}Notice the {{{ #://... }}} and {{{ @://... }}}, these are used to include local and remote files in your Template respectively.
This Template will then include examples/fs/INCREDIBLE.md and docker-compose.yaml (from Secured Signal API) in its File Content.
Which results in:
Wow, look at this incredible file... 🥳// src: cmd/root.go
package cmd
import (
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "goplater",
Short: "Go Template CLI",
Long: `Go CLI Programm to Template files.`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
}
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
func init() {
}You want the `docker-compose.yaml` file for Secured Signal API?
Really? Here you go:404: Not FoundFound a bug or just want to change or add something? Feel free to open up an issue or a PR!
Like this Project? Or just want to help? Why not ⭐️ this Repo? :)