initial generation for play.golang.org linking, ref #37
This commit is contained in:
@@ -68,7 +68,7 @@ func main() {
|
||||
|
||||
// Now let's look at decoding JSON data into Go
|
||||
// values. Here's an example for a generic data
|
||||
// structure.
|
||||
// structure.
|
||||
byt := []byte(`{"num":6.0,"strs":["a","b"]}`)
|
||||
|
||||
// We need to provide a variable where the JSON
|
||||
|
||||
@@ -69,7 +69,7 @@ func main() {
|
||||
// The `bufio` package implements a buffered
|
||||
// reader that may be useful both for its efficiency
|
||||
// with many small reads and because of the additional
|
||||
// reading methods it provides.
|
||||
// reading methods it provides.
|
||||
r4 := bufio.NewReader(f)
|
||||
b4, err := r4.Peek(5)
|
||||
check(err)
|
||||
|
||||
@@ -27,7 +27,7 @@ func main() {
|
||||
|
||||
// In addition to these basic operations, slices
|
||||
// support several more that make them richer than
|
||||
// arrays. One is the builtin `append`, which
|
||||
// arrays. One is the builtin `append`, which
|
||||
// returns a slice containing one or more new values.
|
||||
// Note that we need to accept a return value from
|
||||
// append as we may get a new slice value.
|
||||
|
||||
@@ -9,7 +9,7 @@ import "strings"
|
||||
|
||||
func main() {
|
||||
|
||||
// We'll parse this example URL, which includes a
|
||||
// We'll parse this example URL, which includes a
|
||||
// scheme, authentication info, host, port, path,
|
||||
// query params, and query fragment.
|
||||
s := "postgres://user:pass@host.com:5432/path?k=v#f"
|
||||
|
||||
Reference in New Issue
Block a user