Documentation ¶
Index ¶
- func LoadRecords(filePath string) (*models.DiffRecordList, error)
- func OutputFileToString(f string, path string) (string, error)
- type JSONFileWriter
- func (w *JSONFileWriter) AddEntry(r interface{}) error
- func (w *JSONFileWriter) AddField(k string, v interface{}) error
- func (w *JSONFileWriter) Close() error
- func (w *JSONFileWriter) CloseList() error
- func (w *JSONFileWriter) CloseObject() error
- func (w *JSONFileWriter) OpenList() error
- func (w *JSONFileWriter) OpenObject() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRecords ¶
func LoadRecords(filePath string) (*models.DiffRecordList, error)
Loads a json file containing a DiffRecordList object
Types ¶
type JSONFileWriter ¶
type JSONFileWriter struct {
// contains filtered or unexported fields
}
JSONFileWriter writes data to a json file
func NewJSONFileWriter ¶
func NewJSONFileWriter(filePath string) (*JSONFileWriter, error)
func (*JSONFileWriter) AddEntry ¶
func (w *JSONFileWriter) AddEntry(r interface{}) error
Add entries to an open json list
func (*JSONFileWriter) AddField ¶
func (w *JSONFileWriter) AddField(k string, v interface{}) error
Add field to an open json object
func (*JSONFileWriter) Close ¶
func (w *JSONFileWriter) Close() error
func (*JSONFileWriter) CloseObject ¶
func (w *JSONFileWriter) CloseObject() error
Close a json object
Click to show internal directories.
Click to hide internal directories.