Commit Graph

2 Commits

Author SHA1 Message Date
Joe Tsai
ac50359592 internal/set: remove Int32s, Int64s, and Strings
So far only Ints is being used and it does not seem like the
other set types will ever be used. Remove them.
We can always add them back if we need them again.

Change-Id: I9a9e8ce76bd231d1fe5b726af7da690dc4019bb8
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/170625
Reviewed-by: Herbie Ong <herbie@google.com>
2019-04-03 22:53:35 +00:00
Joe Tsai
d55639e713 internal/set: add set package for set data structures
Package set provides simple set data structures for uint64 and string types.

High-level API:
	type Set(T {}) xxx
	func (Set) Len() int
	func (Set) Has(T) bool
	func (Set) Set(T)
	func (Set) Clear(T)

These data structures are useful for implementing required fields efficiently
or ensuring that protobuf identifiers do not conflict.

Change-Id: If846630a9034909a43121b3e0f6720275f4b7aaf
Reviewed-on: https://go-review.googlesource.com/128898
Reviewed-by: Chris Manghane <cmang@golang.org>
2018-08-09 21:46:35 +00:00