github.com/iron-io/functions@v0.0.0-20180820112432-d59d7d1c40b2/examples/hello/go/README.md (about)

     1  # Quick Example for a Go Function (3 minutes)
     2  
     3  This example will show you how to test and deploy Go (Golang) code to IronFunctions.
     4  
     5  ```sh
     6  # create your func.yaml file
     7  fn init <YOUR_DOCKERHUB_USERNAME>/hello
     8  # build the function
     9  fn build
    10  # test it
    11  cat hello.payload.json | fn run
    12  # push it to Docker Hub
    13  fn push
    14  # Create a route to this function on IronFunctions
    15  fn routes create myapp /hello
    16  ```
    17  
    18  Now you can call your function on IronFunctions:
    19  
    20  ```sh
    21  curl -H "Content-Type: application/json" -X POST -d @hello.payload.json http://localhost:8080/r/myapp/hello
    22  ```
    23  
    24  ## Dependencies
    25  
    26  Be sure you're dependencies are in the `vendor/` directory and that's it.
    27