I hereby claim:
- I am pumpkinseed on github.
- I am pumpkinseed (https://keybase.io/pumpkinseed) on keybase.
- I have a public key ASDETIsqylA0ZhLdIsu3jkz2su4a9MPqtuVDqPrOIrlwQAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| type webshop struct { | |
| Token string `json:"token"` | |
| ... | |
| PaymentTransactionID string `json:"payment_transaction_id"` | |
| Product *product `json:"product" cb_referenced:"product"` | |
| Store *store `json:"store,omitempty" cb_referenced:"store"` | |
| } | |
| type product struct { | |
| ID string `json:"id"` |
| package htmltopdf | |
| import ( | |
| "bytes" | |
| "io/ioutil" | |
| // import the main library what we use | |
| "github.com/SebastiaanKlippert/go-wkhtmltopdf" | |
| ) |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "reflect" | |
| ) | |
| var test = `{ | |
| "title":"%s", |
| func structScan(rows *sql.Rows, model interface{}) error { | |
| v := reflect.ValueOf(model) | |
| if v.Kind() != reflect.Ptr { | |
| return errors.New("must pass a pointer, not a value, to StructScan destination") // @todo add new error message | |
| } | |
| v = reflect.Indirect(v) | |
| t := v.Type() | |
| cols, _ := rows.Columns() |
| func Contains(s, value interface{}) bool { | |
| v := reflect.ValueOf(s) | |
| for i := 0; i < v.NumField(); i++ { | |
| field := v.Field(i) | |
| typeOfField := field.Type() | |
| switch typeOfField { | |
| case stringType: | |
| if containsString(field.String(), value) { | |
| return true | |
| } |
| package output | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "github.com/PumpkinSeed/heurelog/config" | |
| ) | |
| type File struct { |
| package input | |
| import ( | |
| "sync" | |
| "fmt" | |
| "github.com/PumpkinSeed/heurelog/config" | |
| "github.com/PumpkinSeed/heurelog/handlers/output" | |
| "github.com/Sirupsen/logrus" |
| package main | |
| import ( | |
| "log" | |
| "runtime" | |
| "time" | |
| ) | |
| var counter int |