@kjk1/

book iota 6

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

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

import "fmt"

func main() {
	// :show start
	type ByteSize int

	const (
		_           = iota // ignore first value by assigning to blank identifier
		KB ByteSize = 1 << (10 * iota)
		MB
		GB
		TB
		PB
	)
	fmt.Printf("KB: %d\n", KB)
	// :show end
}