2021-02-08 17:53:34 +00:00
|
|
|
package airportsdb
|
|
|
|
|
|
|
|
import (
|
2021-06-28 14:01:31 +00:00
|
|
|
"io/fs"
|
2021-02-08 17:53:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Option sets an optional parameter of DB.
|
|
|
|
type Option func(*options)
|
|
|
|
|
|
|
|
type options struct {
|
2021-06-28 14:01:31 +00:00
|
|
|
airportMode, countryMode fs.FileMode
|
2021-02-08 17:53:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func defaultOpts() *options {
|
|
|
|
return &options{
|
2021-06-28 14:01:31 +00:00
|
|
|
airportMode: fs.ModePerm, // 0777
|
|
|
|
countryMode: fs.ModePerm, // 0777
|
2021-02-08 17:53:34 +00:00
|
|
|
}
|
|
|
|
}
|