fall

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 1 Imported by: 397

Documentation

Overview

Package fall handles the fallthrough logic used in plugins that support it.

Index

Constants

This section is empty.

Variables

View Source
var Root = func() F {
	return F{[]string{"."}}
}()

Root returns F set to only ".".

View Source
var Zero = func() F {
	return F{[]string{}}
}()

Zero returns a zero valued F.

Functions

This section is empty.

Types

type F

type F struct {
	Zones []string
}

F can be nil to allow for no fallthrough, empty allow all zones to fallthrough or contain a zone list that is checked.

func (F) Equal

func (f F) Equal(g F) bool

Equal returns true if f and g are equal.

func (*F) SetZonesFromArgs

func (f *F) SetZonesFromArgs(zones []string)

SetZonesFromArgs sets zones in f to the passed value or to "." if the slice is empty.

func (F) Through

func (f F) Through(qname string) bool

Through will check if we should fallthrough for qname. Note that we've named the variable in each plugin "Fall", so this then reads Fall.Through().

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL