style: gofmt + fix errcheck lint warning
All checks were successful
CI / Test (push) Successful in 3m2s
CI / Lint (push) Successful in 3m7s
CI / Release (push) Successful in 1m55s
CI / Notify Downstream (stt-module) (push) Successful in 1s
CI / Notify Downstream (voice-assistant) (push) Successful in 1s
CI / Notify (push) Successful in 2s
CI / Notify Downstream (chat-handler) (push) Successful in 1s
CI / Notify Downstream (pipeline-bridge) (push) Successful in 1s
CI / Notify Downstream (tts-module) (push) Successful in 1s
All checks were successful
CI / Test (push) Successful in 3m2s
CI / Lint (push) Successful in 3m7s
CI / Release (push) Successful in 1m55s
CI / Notify Downstream (stt-module) (push) Successful in 1s
CI / Notify Downstream (voice-assistant) (push) Successful in 1s
CI / Notify (push) Successful in 2s
CI / Notify Downstream (chat-handler) (push) Successful in 1s
CI / Notify Downstream (pipeline-bridge) (push) Successful in 1s
CI / Notify Downstream (tts-module) (push) Successful in 1s
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
package messages
|
||||
|
||||
import (
|
||||
"time"
|
||||
"time"
|
||||
|
||||
pb "git.daviestechlabs.io/daviestechlabs/handler-base/gen/messagespb"
|
||||
pb "git.daviestechlabs.io/daviestechlabs/handler-base/gen/messagespb"
|
||||
)
|
||||
|
||||
// ════════════════════════════════════════════════════════════════════════════
|
||||
@@ -57,13 +57,13 @@ type PipelineStatus = pb.PipelineStatus
|
||||
|
||||
// EffectiveQuery returns Message or falls back to Query.
|
||||
func EffectiveQuery(c *ChatRequest) string {
|
||||
if c.GetMessage() != "" {
|
||||
return c.GetMessage()
|
||||
}
|
||||
return c.GetQuery()
|
||||
if c.GetMessage() != "" {
|
||||
return c.GetMessage()
|
||||
}
|
||||
return c.GetQuery()
|
||||
}
|
||||
|
||||
// Timestamp returns the current Unix timestamp.
|
||||
func Timestamp() int64 {
|
||||
return time.Now().Unix()
|
||||
return time.Now().Unix()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user