You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
503 B
22 lines
503 B
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package prefs
|
|
|
|
// Options are used to configure additional parameters of a preference.
|
|
type Options func(s *metadata)
|
|
|
|
var (
|
|
// ReadOnly is an option that marks preference as read-only.
|
|
ReadOnly Options = markReadOnly
|
|
// Managed is an option that marks preference as managed.
|
|
Managed Options = markManaged
|
|
)
|
|
|
|
func markReadOnly(s *metadata) {
|
|
s.ReadOnly = true
|
|
}
|
|
|
|
func markManaged(s *metadata) {
|
|
s.Managed = true
|
|
}
|
|
|