This file contains hidden or 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" | |
| type Person struct { | |
| Name string | |
| Surname string | |
| } | |
| func main() { |
This file contains hidden or 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 ( | |
| "log" | |
| "reflect" | |
| "os" | |
| ) | |
| // Find an object in a slice comparing a KEY (string) and its VALUE (interface{}) | |
| func findByKey(objArr interface{}, key string, value interface{}) interface{} { |
This file contains hidden or 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 ( | |
| "bytes" | |
| "encoding/json" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" | |
| "time" |
NewerOlder