Skip to content
Zelenko edited this page Nov 25, 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"},  // name only given
		{"Go in Action", 2016}, // name and description 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}

Clone this wiki locally