From 35826dd72569c4b537328690c63a578f84a1e225 Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Thu, 23 Jan 2025 14:50:41 -0300 Subject: [PATCH] refactor(blogo,core)!: rename Opts to ServerOpts --- blogo/core/core.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blogo/core/core.go b/blogo/core/core.go index 3a79d41..c786db2 100644 --- a/blogo/core/core.go +++ b/blogo/core/core.go @@ -32,8 +32,8 @@ import ( // Creates a implementation of [http.Handler] that maps the [(*http.Request).Path] to a file of the // same name in the file system provided by the sourcer. Use [Opts] to have more fine grained control // over some additional behaviour of the implementation. -func NewServer(sourcer plugin.Sourcer, renderer plugin.Renderer, opts ...Opts) http.Handler { - opt := Opts{} +func NewServer(sourcer plugin.Sourcer, renderer plugin.Renderer, opts ...ServerOpts) http.Handler { + opt := ServerOpts{} if len(opts) > 0 { opt = opts[0] } @@ -70,7 +70,7 @@ func NewServer(sourcer plugin.Sourcer, renderer plugin.Renderer, opts ...Opts) h // Options used in the construction of the server/[http.Handler] in [NewServer] to better // control additional behaviour of the implementation. -type Opts struct { +type ServerOpts struct { // Call [(plugin.Sourcer).Source] on construction of the implementation on [NewServer]? // Panics if the it returns a error. By default sourcing of files is done on the first // request.