move options to dedicated package
Some checks failed
lint / lint (pull_request) Failing after 1m31s
pr / test (pull_request) Failing after 2m37s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-07-29 00:40:58 +03:00
parent b1dbd99ce2
commit 6f6f850af6
84 changed files with 1154 additions and 4521 deletions

View File

@@ -3,6 +3,8 @@ package store
import (
"context"
"testing"
"go.unistack.org/micro/v4/options"
)
func TestFromNilContext(t *testing.T) {
@@ -43,10 +45,7 @@ func TestNewContext(t *testing.T) {
func TestSetOption(t *testing.T) {
type key struct{}
o := SetOption(key{}, "test")
opts := &Options{}
o(opts)
opts := NewOptions(options.ContextOption(key{}, "test"))
if v, ok := opts.Context.Value(key{}).(string); !ok || v == "" {
t.Fatal("SetOption not works")
}