// createUserStrategy creates a new user strategy.
createUserStrategy creates a new user strategy.
// createUserStrategy creates a new user strategy .
func createUserStrategy(opts *policy.RunAsUserStrategyOptions) (user.RunAsUserStrategy, error) {
	switch opts.Rule {
	case policy.RunAsUserStrategyMustRunAs:
		return user.NewMustRunAs(opts)
	case policy.RunAsUserStrategyMustRunAsNonRoot:
		return user.NewRunAsNonRoot(opts)
	case policy.RunAsUserStrategyRunAsAny:
		return user.NewRunAsAny(opts)
	default:
		return nil, fmt.Errorf("Unrecognized RunAsUser strategy type %s", opts.Rule)
	}
}
func createUserStrategy ( opts * policy . RunAsUserStrategyOptions ) ( user . RunAsUserStrategy , error ) { switch opts . Rule { case policy . RunAsUserStrategyMustRunAs : return user . NewMustRunAs ( opts ) case policy . RunAsUserStrategyMustRunAsNonRoot : return user . NewRunAsNonRoot ( opts ) case policy . RunAsUserStrategyRunAsAny : return user . NewRunAsAny ( opts ) default : return nil , fmt . Errorf ( " " , opts . Rule ) } }
createUserStrategy creates a new user strategy.
createUserStrategy creates a new user strategy .