type TruthTable … // NewTruthTableFromItems creates a new truth table with items func NewTruthTableFromItems(items []string, defaultValue *bool) *TruthTable { … } // NewTruthTable creates a new truth table with froms and tos func NewTruthTable(froms []string, tos []string, defaultValue *bool) *TruthTable { … } // IsComplete returns true if there's a value set for every single pair of items, otherwise it returns false. func (tt *TruthTable) IsComplete() bool { … } // Set sets the value for from->to func (tt *TruthTable) Set(from string, to string, value bool) { … } // SetAllFrom sets all values where from = 'from' func (tt *TruthTable) SetAllFrom(from string, value bool) { … } // SetAllTo sets all values where to = 'to' func (tt *TruthTable) SetAllTo(to string, value bool) { … } // Get gets the specified value func (tt *TruthTable) Get(from string, to string) bool { … } // Compare is used to check two truth tables for equality, returning its // result in the form of a third truth table. Both tables are expected to // have identical items. func (tt *TruthTable) Compare(other *TruthTable) *TruthTable { … } // PrettyPrint produces a nice visual representation. func (tt *TruthTable) PrettyPrint(indent string) string { … }