find uuid
This commit is contained in:
parent
05105e6fd1
commit
e69177bc53
1
argv.go
1
argv.go
|
@ -25,6 +25,7 @@ type EmptyCmd struct {
|
|||
type PlaybackCmd struct {
|
||||
List *EmptyCmd `arg:"subcommand:list" help:"list memories"`
|
||||
Force bool `arg:"--all" help:"try to strong arm things"`
|
||||
Uuid string `arg:"--uuid" help:"look at this uuid"`
|
||||
}
|
||||
|
||||
func (args) Version() string {
|
||||
|
|
|
@ -7,6 +7,10 @@ import (
|
|||
)
|
||||
|
||||
func doPlayback() {
|
||||
if argv.Playback.Uuid != "" {
|
||||
showChat(argv.Playback.Uuid)
|
||||
return
|
||||
}
|
||||
log.Infof("Found %d chat topic(s) in the log.", len(me.chats.GetChats()))
|
||||
fmt.Println("-------------------------------------------------")
|
||||
|
||||
|
@ -35,3 +39,13 @@ func doPlayback() {
|
|||
}
|
||||
fmt.Println("-------------------------------------------------")
|
||||
}
|
||||
|
||||
func showChat(uuid string) {
|
||||
chat := me.chats.FindByUuid(uuid)
|
||||
if chat == nil {
|
||||
log.Info("unknown uuid", uuid)
|
||||
return
|
||||
}
|
||||
log.Info("uuid was found ok", uuid)
|
||||
// TODO: show the chat entries here
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue