This commit is contained in:
konrad 2019-04-07 11:15:06 +02:00
commit d0979fe24b
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 26 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.kolaente.de/konrad/miracle-sort
go 1.12

22
main.go Normal file
View File

@ -0,0 +1,22 @@
package main
import "fmt"
func main() {
// This is the map we want to sort
m := make(map[int]string)
m[0] = "first"
m[1] = "second"
m[2] = "third"
m[3] = "fourth"
m[4] = "fifth"
m[5] = "sixth"
m[6] = "seventh"
m[7] = "eighth"
m[8] = "nineth"
m[9] = "tenth"
for index, msg := range m {
fmt.Println(index, ": ", msg)
}
}