@kjk1/

gobook range slice

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.7156454980616429","path":"main.go","file":{"path":"main.go","content":{"asEncoding":{"base64":"cGFja2FnZSBtYWluCgppbXBvcnQgImZtdCIKCmZ1bmMgbWFpbigpIHsKCS8vIDpzaG93IHN0YXJ0CglhIDo9IFtdaW50ezMsIDE1LCA4fQoJZm9yIGlkeCwgZWwgOj0gcmFuZ2UgYSB7CgkJZm10LlByaW50ZigiaWR4OiAlZCwgZWxlbWVudDogJWRcbiIsIGlkeCwgZWwpCgl9CgkvLyA6c2hvdyBlbmQKfQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
package main

import "fmt"

func main() {
	// :show start
	a := []int{3, 15, 8}
	for idx, el := range a {
		fmt.Printf("idx: %d, element: %d\n", idx, el)
	}
	// :show end
}