github.com/haraldrudell/parl@v0.4.176/sets/set-element.go (about) 1 /* 2 © 2022–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 3 ISC License 4 */ 5 6 package sets 7 8 type SetElement[T comparable] struct { 9 ValueV T 10 Name string 11 } 12 13 var _ Element[int] = &SetElement[int]{} 14 15 func (pv *SetElement[T]) Value() (value T) { 16 return pv.ValueV 17 } 18 19 func (pv *SetElement[T]) String() (s string) { 20 return pv.Name 21 }