From 9513ed3ba0c453a6e038dc454d209d7134ebe752 Mon Sep 17 00:00:00 2001 From: David Thorpe Date: Sat, 7 Jan 2023 19:52:51 +0100 Subject: [PATCH] Made the NewContext method private --- bindings/go/pkg/whisper/context.go | 2 +- bindings/go/pkg/whisper/model.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/go/pkg/whisper/context.go b/bindings/go/pkg/whisper/context.go index baff611..496a986 100644 --- a/bindings/go/pkg/whisper/context.go +++ b/bindings/go/pkg/whisper/context.go @@ -24,7 +24,7 @@ var _ Context = (*context)(nil) /////////////////////////////////////////////////////////////////////////////// // LIFECYCLE -func NewContext(model *model, params whisper.Params) (Context, error) { +func newContext(model *model, params whisper.Params) (Context, error) { context := new(context) context.model = model context.params = params diff --git a/bindings/go/pkg/whisper/model.go b/bindings/go/pkg/whisper/model.go index 13cb52c..6505604 100644 --- a/bindings/go/pkg/whisper/model.go +++ b/bindings/go/pkg/whisper/model.go @@ -91,5 +91,5 @@ func (model *model) NewContext() (Context, error) { params.SetThreads(runtime.NumCPU()) // Return new context - return NewContext(model, params) + return newContext(model, params) }