options.go 585 Bytes
Newer Older
songlinfeng's avatar
songlinfeng committed
1
2
3
4
5
6
/**
# Copyright (c) 2024, HCUOpt CORPORATION.  All rights reserved.
**/

package root

7
import "dcu-container-toolkit/internal/logger"
songlinfeng's avatar
songlinfeng committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

type Option func(*Driver)

func WithLogger(logger logger.Interface) Option {
	return func(d *Driver) {
		d.logger = logger
	}
}

func WithDriverRoot(root string) Option {
	return func(d *Driver) {
		d.Root = root
	}
}

func WithLibrarySearchPaths(paths ...string) Option {
	return func(d *Driver) {
		d.librarySearchPaths = paths
	}
}

func WithConfigSearchPaths(paths ...string) Option {
	return func(d *Driver) {
		d.configSearchPaths = paths
	}
}