This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
client := &http.Client{] | |
req, err := http.NewRequest("POST", "http://example.com", bytes.NewReader(postData)) | |
req.Header.Add("User-Agent", "myClient") | |
resp, err := client.Do(req) | |
defer resp.Body.Close() |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project: