Golang script example

We will use Golang to make an HTTP request and give the Go script some command-line arguments. These will be used to formulate the following request body that will have the following shape:

{ "tag_name": "v1.0.0", "target_commitish": "master", "name": "v1.0.0", "body": "Description of the release", "draft": false, "prerelease": false}

Here is the first part of the deployment script:

In this part of the script, we declare our package of main and then get some command-line arguments that we will need to make our HTTP request. We need to parse them and check if they are are set, which is what the checkArgs function does ...

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.