Skip to content

fix typo #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions embeddednats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
)

type options struct {
DataDirectory string
ShouldClearData bool
NATSSeverOptions *server.Options
DataDirectory string
ShouldClearData bool
NATSServerOptions *server.Options
}

type Option func(*options)
Expand All @@ -32,7 +32,7 @@ func WithShouldClearData(shouldClearData bool) Option {

func WithNATSServerOptions(natsServerOptions *server.Options) Option {
return func(o *options) {
o.NATSSeverOptions = natsServerOptions
o.NATSServerOptions = natsServerOptions
}
}

Expand All @@ -56,15 +56,15 @@ func New(ctx context.Context, opts ...Option) (*Server, error) {
}
}

if options.NATSSeverOptions == nil {
options.NATSSeverOptions = &server.Options{
if options.NATSServerOptions == nil {
options.NATSServerOptions = &server.Options{
JetStream: true,
StoreDir: options.DataDirectory,
}
}

// Initialize new server with options
ns, err := server.NewServer(options.NATSSeverOptions)
ns, err := server.NewServer(options.NATSServerOptions)
if err != nil {
panic(err)
}
Expand Down