File: include.go

package info (click to toggle)
golang-github-mitchellh-hashstructure 0.0~git20160209.0.6b17d66-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 76 kB
  • ctags: 27
  • sloc: makefile: 4
file content (15 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package hashstructure

// Includable is an interface that can optionally be implemented by
// a struct. It will be called for each field in the struct to check whether
// it should be included in the hash.
type Includable interface {
	HashInclude(field string, v interface{}) (bool, error)
}

// IncludableMap is an interface that can optionally be implemented by
// a struct. It will be called when a map-type field is found to ask the
// struct if the map item should be included in the hash.
type IncludableMap interface {
	HashIncludeMap(field string, k, v interface{}) (bool, error)
}