Skip to content
Permalink
v1.1.0
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (16 sloc) 566 Bytes
package confyg
// Allower defines if a given verb and block combination is valid for
// configuration parsing.
//
// If this is intended to be a statement-like verb, block should be set
// to false. If this is intended to be a block-like verb, block should
// be set to true.
type Allower interface {
Allow(verb string, block bool) bool
}
// AllowerFunc implements Allower for inline definitions.
type AllowerFunc func(verb string, block bool) bool
// Allow implements Allower.
func (a AllowerFunc) Allow(verb string, block bool) bool {
return a(verb, block)
}