aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/config/config.go
Commit message (Collapse)AuthorAgeFilesLines
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-3/+3
| | | | Any is the preferred over interface{} now in Go.
* pkg/config: merge functions, simplifyTaras Madan2025-02-141-5/+1
|
* all: use special placeholder for errorsTaras Madan2023-07-241-2/+2
|
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-2/+2
|
* pkg/config: fix comments strippingMarco Elver2022-09-271-1/+1
| | | | | | | | | | The comment-stripping regex doesn't work for multi-line comments, because the regex looks for a substring that both starts _and_ ends with a newline character. Since a single newline cannot be used into multiple matches, only the first comment line is found and later lines are not removed resulting in a parsing error. Fix it by looking for substrings _until_ a newline.
* pkg/config: support commentsDmitry Vyukov2021-04-281-0/+3
| | | | | Strip lines starting with # before json deserialization. This allows to have comments!
* pkg/config: use DisallowUnknownFieldsDmitry Vyukov2021-04-281-84/+4
| | | | | DisallowUnknownFields was added in Go 1.10, remove our custom machinery for checking unknown fields.
* pkg/mgrconfig: do not serialize optional fieldsDmitry Vyukov2019-01-161-0/+1
| | | | Since we now show manager config on web page, make it leaner.
* all: get rid of underscores in identifiersDmitry Vyukov2018-05-071-2/+10
| | | | | | Underscores are against Go coding style. Update #538
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-1/+1
| | | | Fix typos, non-canonical code, remove dead code, etc.
* pkg/config: provide SaveData functionDmitry Vyukov2017-11-161-1/+5
| | | | Parallel to LoadFile/LoadData.
* all: use consistent file permissionsDmitry Vyukov2017-07-031-1/+3
| | | | | | | | | | | | | | | | Currently we have unix permissions for new files/dirs hardcoded throughout the code base. Some places use 0644, some - 0640, some - 0600 and a variety of other constants. Introduce osutil.MkdirAll/WriteFile that use the default permissions and use them throughout the code base. This makes permissions consistent and also allows to easily change the permissions later if we change our minds. Also merge pkg/fileutil into pkg/osutil as they become dependent on each other. The line between them was poorly defined anyway as both operate on files.
* pkg/config: support time.Time fieldsDmitry Vyukov2017-06-301-0/+3
|
* pkg/config: add SaveFile functionDmitry Vyukov2017-06-191-0/+8
|
* pkg/config: support null valuesDmitry Vyukov2017-06-031-1/+1
|
* vm: overhaulDmitry Vyukov2017-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VM infrastructure currently has several problems: - Config struct is complete mess with a superset of params for all VM types - verification of Config is mess spread across several places - there is no place where VM code could do global initialization like creating GCE connection, uploading GCE image to GCS, matching adb devices with consoles, etc - it hard to add private VM implementations such impl would need to add code to config package which would lead to constant merge conflicts - interface for VM implementation is mixed with interface for VM users this does not allow to provide best interface for both of them - there is no way to add common code for all VM implementations This change solves these problems by: - splitting VM interface for users (vm package) and VM interface for VM implementations (vmimpl pacakge), this in turn allows to add common code - adding Pool concept that allows to do global initialization and config checking at the right time - decoupling manager config from VM-specific config each VM type now defines own config Note: manager configs need to be changed after this change: VM-specific parts are moved to own "vm" subobject. Note: this change also drops "local" VM type. Its story was long unclear and there is now syz-stress which solves the same problem.
* pkg/config: support nested structsDmitry Vyukov2017-06-031-7/+45
|
* config: split and refactorDmitry Vyukov2017-06-011-0/+61
Introduce generic config.Load function that can be reused across multiple programs (syz-manager, syz-gce, etc). Move the generic config functionality to pkg/config package. The idea is to move all helper (non-main) packages to pkg/ dir, because we have more and more of them and they pollute the top dir. Move the syz-manager config parts into syz-manager/config package.