Skip to content

Commit

Permalink
Merge pull request #50 from overmindtech/minor-improvements
Browse files Browse the repository at this point in the history
Minor improvements
  • Loading branch information
DavidS-ovm authored Aug 22, 2023
2 parents 5679eeb + 3b22f42 commit 1c497d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/createbookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func CreateBookmark(signals chan os.Signal, ready chan bool) int {
if err != nil {
log.Infof("Error rendering bookmark: %v", err)
} else {
log.Info(string(b))
fmt.Println(string(b))
}

return 0
Expand Down
7 changes: 5 additions & 2 deletions cmd/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func Request(signals chan os.Signal, ready chan bool) int {
// nolint: bodyclose // nhooyr.io/websocket reads the body internally
c, _, err := websocket.Dial(ctx, gatewayUrl, options)
if err != nil {
lf["gateway-url"] = gatewayUrl
log.WithContext(ctx).WithFields(lf).WithError(err).Error("Failed to connect to overmind API")
return 1
}
Expand Down Expand Up @@ -342,8 +343,9 @@ func createInitialRequest() (*sdp.GatewayRequest, error) {
msgID := uuid.New()
req.RequestType = &sdp.GatewayRequest_LoadBookmark{
LoadBookmark: &sdp.LoadBookmark{
UUID: bookmarkUUID[:],
MsgID: msgID[:],
UUID: bookmarkUUID[:],
MsgID: msgID[:],
IgnoreCache: viper.GetBool("ignore-cache"),
},
}
case "load-snapshot":
Expand Down Expand Up @@ -374,6 +376,7 @@ func init() {
requestCmd.PersistentFlags().String("query-type", "*", "The type to query")
requestCmd.PersistentFlags().String("query", "", "The actual query to send")
requestCmd.PersistentFlags().String("query-scope", "*", "The scope to query")
requestCmd.PersistentFlags().Bool("ignore-cache", false, "Set to true to ignore all caches in overmind.")

requestCmd.PersistentFlags().String("bookmark-uuid", "", "The UUID of the bookmark to load")
requestCmd.PersistentFlags().String("snapshot-uuid", "", "The UUID of the snapshot to load")
Expand Down

0 comments on commit 1c497d4

Please sign in to comment.