Commit 62a69bedaa13a301c4acaf278d288f3a506fa37f
1 parent
8dc665d4a1
Exists in
master
and in
1 other branch
Init/Reload Tables is now Init/Reload PayloadMetaData
Showing
1 changed file
with
4 additions
and
9 deletions
Show diff stats
json_utility.go
... | ... | @@ -47,9 +47,11 @@ type Payload struct { |
47 | 47 | Data interface{} `json:"data"` |
48 | 48 | } |
49 | 49 | |
50 | -// InitTables loads all payloads in the payloads variable. | |
50 | +// InitPayloadsMetaData loads all payloads in the payloads variable. | |
51 | 51 | // Returns an error if it fails. |
52 | -func InitPayloads(db *ora.Ses, project string) error { | |
52 | +func InitPayloadsMetaData(db *ora.Ses, project string) error { | |
53 | + payloads = make([]Payload, 0) | |
54 | + | |
53 | 55 | jsonbuf, err := fetchJSON(db, project) |
54 | 56 | if err != nil { |
55 | 57 | return err |
... | ... | @@ -64,13 +66,6 @@ func InitPayloads(db *ora.Ses, project string) error { |
64 | 66 | return nil |
65 | 67 | } |
66 | 68 | |
67 | -// ReloadTables reloads all payloads in the payloads variable. | |
68 | -// Returns an error if it fails. | |
69 | -func ReloadPayloads(db *ora.Ses, project string) error { | |
70 | - payloads = make([]Payload, 0) | |
71 | - return InitPayloads(db, project) | |
72 | -} | |
73 | - | |
74 | 69 | // DecodeJSON decodes JSON data from r to v. |
75 | 70 | // Returns an error if it fails. |
76 | 71 | func DecodeJSON(r io.Reader, v interface{}) error { | ... | ... |