signald-go/cmd/signaldctl/common/signald.go
2021-02-01 13:08:27 -08:00

29 lines
406 B
Go

package common
import (
"log"
"gitlab.com/signald/signald-go/signald"
"gitlab.com/signald/signald-go/signald/client-protocol/v0"
)
var (
Signald *signald.Signald
OutputFormat string
)
func Must(err error) {
if err != nil {
log.Fatal(err)
}
}
func GetResponse(c chan v0.LegacyResponse, id string) v0.LegacyResponse {
for {
message := <-c
if message.ID == id {
return message
}
}
}