mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
* 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
11 lines
320 B
Go
11 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
|
|
}
|