hello_jupiter

command module
v0.0.0-...-7060307 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Example: Hello, jupiter

This is the simplest possible demonstration of how templating works. Here we just take a "hello world" program and turn it into a "hello jupiter" program by doing a simple string replacement.

To run this:

  1. cd into an empty directory

    $ mkdir ~/template_tmp
    $ cd ~/template_tmp
    
  2. Install the abc binary

    $ go install github.com/abcxyz/abc/cmd/abc@latest
    $ abc --help
    

    This only works if you have go installed (https://go.dev/doc/install) and have the Go binary directory in your $PATH (try PATH=$PATH:~/go/bin).

  3. Execute the template defined by the spec.yaml file in the example directory. This will output a file named main.go in your working directory containing the transformed program.

    ```shell
    $ abc render github.com/abcxyz/abc/examples/templates/render/hello_jupiter@latest
    ```
    
  4. Run the transformed program:

    $ go run .
    Hello, jupiter!
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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