@kjk1/

gobook struct anonymous

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6287631499610458","path":"main.go","file":{"path":"main.go","content":{"asEncoding":{"base64":"cGFja2FnZSBtYWluCgppbXBvcnQgImZtdCIKCmZ1bmMgbWFpbigpIHsKCS8vIDpzaG93IHN0YXJ0CglkYXRhIDo9IHN0cnVjdCB7CgkJTnVtYmVyIGludAoJCVRleHQgICBzdHJpbmcKCX17CgkJNDIsCgkJIkhlbGxvIHdvcmxkISIsCgl9CgoJZm10LlByaW50ZigiZGF0YTogJSt2XG4iLCBkYXRhKQoJLy8gOnNob3cgZW5kCn0K"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main

import "fmt"

func main() {
	// :show start
	data := struct {
		Number int
		Text   string
	}{
		42,
		"Hello world!",
	}

	fmt.Printf("data: %+v\n", data)
	// :show end
}