diff --git a/json_utility.go b/json_utility.go index 9d6f4ea..515a5dc 100644 --- a/json_utility.go +++ b/json_utility.go @@ -47,9 +47,11 @@ type Payload struct { Data interface{} `json:"data"` } -// InitTables loads all payloads in the payloads variable. +// InitPayloadsMetaData loads all payloads in the payloads variable. // Returns an error if it fails. -func InitPayloads(db *ora.Ses, project string) error { +func InitPayloadsMetaData(db *ora.Ses, project string) error { + payloads = make([]Payload, 0) + jsonbuf, err := fetchJSON(db, project) if err != nil { return err @@ -64,13 +66,6 @@ func InitPayloads(db *ora.Ses, project string) error { return nil } -// ReloadTables reloads all payloads in the payloads variable. -// Returns an error if it fails. -func ReloadPayloads(db *ora.Ses, project string) error { - payloads = make([]Payload, 0) - return InitPayloads(db, project) -} - // DecodeJSON decodes JSON data from r to v. // Returns an error if it fails. func DecodeJSON(r io.Reader, v interface{}) error {