Created
September 30, 2014 20:27
-
-
Save jochasinga/3fc186da6844c7d5ada6 to your computer and use it in GitHub Desktop.
Function in Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func colormap(r uint8, g uint8, b uint8) (color map[string]uint8) { | |
color := map[string]uint8{ | |
"r" : r | |
"g" : g, | |
"b" : b, | |
} | |
// return color | |
return | |
} | |
func main() { | |
fmt.Println(colormap(255, 255, 255)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment