$ go get -d github.com/depop/logentries
Set LOGENTRIES_TOKEN environment variable with your token
package main
import (
"fmt"
logentries "github.com/depop/logentries"
)
func main() {
client := logentries.New("api-key")
resp, err := client.LogSet.Create(&logentries.LogSetCreateRequest{
logentries.LogSetFields{
Name: "foobar",
},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}