mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
11dff7ca92
* Allow users to disable host_users * Add missing files * Address review comments * Fix tests * Check additional queries for nil, not the whole hostsettings * Finally fix tests
12 lines
320 B
Go
12 lines
320 B
Go
package osquery_utils
|
|
|
|
// EmptyToZero Sometimes osquery gives us empty string where we expect an integer.
|
|
// We change the to "0" so it can be handled by the appropriate string to
|
|
// integer conversion function, as these will err on ""
|
|
func EmptyToZero(val string) string {
|
|
if val == "" {
|
|
return "0"
|
|
}
|
|
return val
|
|
}
|