24 lines
292 B
Go
24 lines
292 B
Go
package mongodbx
|
|
|
|
type mongodbOptions struct {
|
|
Host string
|
|
}
|
|
|
|
func defaultOptions() *mongodbOptions {
|
|
return &mongodbOptions{
|
|
Host: "localhost:27017",
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
type Option func(*mongodbOptions)
|
|
|
|
func WithHost(host string) Option {
|
|
return func(o *mongodbOptions) {
|
|
o.Host = host
|
|
}
|
|
}
|
|
|