package api import ( "bytes" "encoding/json" ) func (s *Service) Dump(o interface{}) { b := bytes.NewBuffer([]byte{}) enc := json.NewEncoder(b) enc.SetIndent("", " ") enc.Encode(o) s.Logger.Printf("%s", b.Bytes()) }