There are three main parts to the Go installation:
-
The
gobinary:This is the main executable file that you will use to compile programs.
-
The standard library:
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <h1>User Data Deletion Instructions (Draft)</h1> | |
| <p>To request deletion of user data, email support@front9.com.</p> | |
| </body> | |
| </html> |
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <h1>Privacy Policy (Draft)</h1> | |
| <p>This is a temporary privacy policy for development purposes.</p> | |
| </body> | |
| </html> |
| ```lisp | |
| ;; This is an example of an auction contract. Users can place new bids by calling | |
| ;; the bid method with the appropriate inputs and outputs: | |
| ;; | |
| ;; Bid tx-format: | |
| ;; -------------- | |
| ;; Input-0: This contract | |
| ;; Input-1: Bid input | |
| ;; | |
| ;; Output-0: This contract |
| ```lisp | |
| ;; This is an example of a vault script. The general concept is to have two keys — a | |
| ;; hot key and a cold key. The cold key is allowed to spend from the script at any | |
| ;; time. If a spend is initiated using the hot key, a timer is started. The hot key | |
| ;; is allowed to spend the funds after the timer expires. At any time before the timer | |
| ;; expires the cold key can spend the funds. | |
| ;; The script allows the following list of custom parameters: | |
| ;;(<hot-key (num)> <cold-key (num)> <fee (num)> <recovery-window (num)> <required-precision (num)>) | |
| ;; |
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "log" | |
| "regexp" | |
| "strings" | |
| ) |
| package main | |
| import "fmt" | |
| func main() { | |
| fmt.Println("Hello World!") | |
| } |
In this tutorial we are going to cover some basics of using the terminal. Hopefully you will be using either linux or mac as the terminal syntax will be the same as I cover here. On windows you can do the same things but the syntax is different. You'll need google how to do these things on windows as I don't know them off the top of my head.
When you open the terminal you will see a comand prompt. Mine looks like this:
chris@chris-Yoga:
| package main | |
| import ( | |
| "crypto/rand" | |
| "fmt" | |
| "github.com/gcash/bchd/bchec" | |
| "log" | |
| ) | |
| func main() { |
| package main | |
| import ( | |
| "encoding/binary" | |
| "fmt" | |
| "github.com/gcash/bchd/bchrpc/pb" | |
| "github.com/gcash/bchd/txscript" | |
| "golang.org/x/net/context" | |
| "google.golang.org/grpc" | |
| "google.golang.org/grpc/credentials" |