Golang does not have built it sets. Basic functionality can be mimicked using maps with empty struct{}. Another option is to use a Boolean value, but empty struct does not use any space and therefore more efficient. Another benefit of empty struct is that Boolean value can be set to true or false, which could […]