19 lines
335 B
Go
19 lines
335 B
Go
package internal
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hashicorp/go-multierror"
|
|
"within.website/olin/policy"
|
|
)
|
|
|
|
func ValidatePolicy(pol policy.Policy) error {
|
|
var err error
|
|
|
|
if pol.RamPageLimit > 2048 {
|
|
err = multierror.Append(err, fmt.Errorf("ram page limit is %d, which is over the limit of 2048", pol.RamPageLimit))
|
|
}
|
|
|
|
return err
|
|
}
|