diff options
| author | Shulhan <ms@kilabit.info> | 2023-12-06 21:33:43 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-06 23:42:08 +0700 |
| commit | 6153a1894c7cfa50843caf4f6f9fe4a2b0a6a7a7 (patch) | |
| tree | b2ec6df8128d497b9b726a4b449535986076c045 | |
| parent | 59c446cd36a4b59365f1144eb612d2484c64d4b9 (diff) | |
| download | awwan-6153a1894c7cfa50843caf4f6f9fe4a2b0a6a7a7.tar.xz | |
all: use the same date format between log and mlog package
In this way, the date-time output from log.Xxx and mlog.Xxx are
consistent.
| -rw-r--r-- | exec_request.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/exec_request.go b/exec_request.go index 893d866..8d78d3d 100644 --- a/exec_request.go +++ b/exec_request.go @@ -8,14 +8,13 @@ import ( "io" "os" "path/filepath" - "time" "github.com/shuLhan/share/lib/mlog" ) // defLogTimeFormat define the default log time format. // This is set as variable to make it easy overwriting it in testing. -var defLogTimeFormat = time.RFC3339 +var defLogTimeFormat = `2006/01/02 15:04:05` // ExecRequest request for executing local or remote script. // Each request define the Mode of execution, Script file to be executed, @@ -56,7 +55,7 @@ func NewExecRequest(mode, script, lineRange string) (req *ExecRequest, err error err = req.init(`.`) if err != nil { - return nil, fmt.Errorf(`NewRequest: %w`, err) + return nil, fmt.Errorf(`NewExecRequest: %w`, err) } return req, nil |
