From 571810c4769fe4a07ef908a0c15a2077d3453e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Sima=CC=83o?= Date: Mon, 29 Nov 2021 10:45:25 -0300 Subject: [PATCH] add comments --- api/replay/cli.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/replay/cli.go b/api/replay/cli.go index 9eed13f..91a0054 100644 --- a/api/replay/cli.go +++ b/api/replay/cli.go @@ -16,11 +16,15 @@ type Cli struct { *api.ApiCli } +//Log saves log to database after populated func (c *Cli) Log(l *types.Log) error { l.Alias = c.ReplayEnvAlias() l.Dtlogend = time.Now() return c.HttpCli().JsonPost("/api/v1/log/add", l, nil) } + +//NewLog creates a new log instance in the client, capable of collecting data in memory for later saving it to the +//database by calling Log func (c *Cli) NewLog() *types.Log { ret := &types.Log{} ret.Alias = c.ReplayEnvAlias()