From 62a69bedaa13a301c4acaf278d288f3a506fa37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Tikvi=C4=87?= Date: Fri, 17 Nov 2017 14:47:11 +0100 Subject: [PATCH] Init/Reload Tables is now Init/Reload PayloadMetaData --- json_utility.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 { -- 1.8.1.2