From c9b68f5f1f66ecde7b9b1cd0ecc9e96c8b391263 Mon Sep 17 00:00:00 2001 From: Jacob LeGrone Date: Fri, 10 Mar 2023 14:18:00 -0500 Subject: [PATCH] Remove unused timeoutFromContext func --- temporal/temporalite/server.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/temporal/temporalite/server.go b/temporal/temporalite/server.go index b1d4e8d546ac..fba1a18f43b2 100644 --- a/temporal/temporalite/server.go +++ b/temporal/temporalite/server.go @@ -6,7 +6,6 @@ package temporalite import ( "os" - "time" "context" "fmt" @@ -158,10 +157,3 @@ func (s *TemporaliteServer) NewClientWithOptions(ctx context.Context, options cl func (s *TemporaliteServer) FrontendHostPort() string { return s.frontendHostPort } - -func timeoutFromContext(ctx context.Context, defaultTimeout time.Duration) time.Duration { - if deadline, ok := ctx.Deadline(); ok { - return deadline.Sub(time.Now()) - } - return defaultTimeout -}