func GetNumRestarts(ctx context.Context, unit string, opts Options) (int, error) {
	value, err := Show(ctx, unit, properties.NRestarts, opts)
	if err != nil {
		return -1, err
	}
	return strconv.Atoi(value)
}
// Get the number of times a process restarted (`systemctl show [unit] --property NRestarts`) as an int
Get the number of times a process restarted (`systemctl show [unit] --property NRestarts`) as an int
// Get the number of times a process restarted ( ` systemctl show [ unit ] -- property NRestarts ` ) as an int
func GetNumRestarts(ctx context.Context, unit string, opts Options) (int, error) {
	value, err := Show(ctx, unit, properties.NRestarts, opts)
	if err != nil {
		return -1, err
	}
	return strconv.Atoi(value)
}
func GetNumRestarts ( ctx context . Context , unit string , opts Options ) ( int , error ) { value , err := Show ( ctx , unit , properties . NRestarts , opts ) if err != nil { return - 1 , err } return strconv . Atoi ( value ) }
Get the number of times a process restarted (`systemctl show [unit] --property NRestarts`) as an int
Get the number of times a process restarted ( ` systemctl show [ unit ] -- property NRestarts ` ) as an int