Skip to content
Zelenko edited this page Nov 26, 2018 · 16 revisions

test this code

resp, err := http.Get("http://example.com/")
...
resp, err := http.Post("http://example.com/upload", "image/jpeg", &buf)
...
resp, err := http.PostForm("http://example.com/form",
	url.Values{"key": {"Value"}, "id": {"123"}})

update all packages: go get -u all

Working on core infrastructure and user facing applications.

Twitter Readme Score release mit

Documentation

Converting stuff

Struct can have blank fields (try in playground)

package main

import "fmt"

func main() {
	for _, book := range []struct {
		title     string
		published uint16
	}{
		{title: "Go Recipes"},  // title only given
		{"Go in Action", 2016}, // title and year given
	} {
		fmt.Printf(book.title+":\t%+v\n", book)
	}
}
// Go Recipes:	{title:Go Recipes published:0}
// Go in Action:	{title:Go in Action published:2016}

Create Presentation (PowerPoint alternative)

go get golang.org/x/tools/cmd/present

go build golang.org/x/tools/cmd/present

Clone this wiki locally