Skip to content

Instantly share code, notes, and snippets.

View pedrobertao's full-sized avatar
🚀

Pedro Bertao pedrobertao

🚀
  • Brazil
View GitHub Profile
package main
import "fmt"
type Person struct {
Name string
Surname string
}
func main() {
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{} {
@pedrobertao
pedrobertao / gqlRawReq.go
Last active September 17, 2022 11:58
Raw HTTP request to a GraphQL server
package main
import (
"bytes"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"os"
"time"