Skip to content

Commit

Permalink
gemini: The gemini version is available in the result
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Johansson committed May 3, 2019
1 parent 69ce1a0 commit e11e01c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Gemini version is now available in the resulting output.
- Improved error handling in validation code.
- Avoiding small double booking of write ops in case of mutation errors.
- Printing executable CQL statements when logging errors or in verbose mode.
Expand Down
6 changes: 4 additions & 2 deletions cmd/gemini/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (r *Status) PrintResult(w io.Writer) {
if err := r.PrintResultAsJSON(w); err != nil {
// In case there has been it has been a long run we want to display it anyway...
fmt.Printf("Unable to print result as json, using plain text to stdout, error=%s\n", err)
fmt.Printf("Gemini version: %s\n", version)
fmt.Printf("Results:\n")
fmt.Printf("\twrite ops: %v\n", r.WriteOps)
fmt.Printf("\tread ops: %v\n", r.ReadOps)
Expand All @@ -86,8 +87,9 @@ func (r *Status) PrintResult(w io.Writer) {
}

func (r *Status) PrintResultAsJSON(w io.Writer) error {
result := map[string]*Status{
"result": r,
result := map[string]interface{}{
"result": r,
"gemini_version": version,
}
b, err := json.MarshalIndent(result, " ", " ")
if err != nil {
Expand Down

0 comments on commit e11e01c

Please sign in to comment.