From 8bec68a1e83749a81074acbe3fac31ace729a0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Tikvi=C4=87?= Date: Tue, 31 Oct 2017 13:31:24 +0100 Subject: [PATCH] added reload tables as a separate func --- json_utility.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/json_utility.go b/json_utility.go index 8b69e3d..844a4fc 100644 --- a/json_utility.go +++ b/json_utility.go @@ -76,6 +76,13 @@ func InitTables(db *ora.Ses, project string) error { return nil } +// ReloadTables reloads all payloads in the payloads variable. +// Returns an error if it fails. +func ReloadTables(db *ora.Ses, project string) error { + payloads = make([]payloadBuff, 0) + return InitTables(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