From 99132fa8a84280a99daa9895fe3555e3de7e3297 Mon Sep 17 00:00:00 2001 From: Renato Freitas Date: Mon, 8 Nov 2021 15:45:45 -0300 Subject: [PATCH] Small change of name in the func name to follow go conventions --- amplitude/client.go | 2 +- amplitude/options.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amplitude/client.go b/amplitude/client.go index 9d93f81..04f3e5c 100644 --- a/amplitude/client.go +++ b/amplitude/client.go @@ -78,7 +78,7 @@ func (c *Client) Start() error { } c.state = Running - c.ctx, c.cancel = context.WithCancel(c.options.GetContext()) + c.ctx, c.cancel = context.WithCancel(c.options.BaseContext()) c.flush = make(chan chan interface{}, 1) c.shutdown = make(chan interface{}, 1) c.closing = make(chan interface{}, 1) diff --git a/amplitude/options.go b/amplitude/options.go index 0bcabaa..824f9de 100644 --- a/amplitude/options.go +++ b/amplitude/options.go @@ -43,7 +43,7 @@ type Options struct { UploadDelegate UploadBatchDelegate // defaults to nil } -func (o *Options) GetContext() context.Context { +func (o *Options) BaseContext() context.Context { if o.Context != nil { return o.Context }