GoLang created a library (golang-set) not assembling

0 votes
asked Jan 18, 2023 in H&E by ANVESH (280 points)

I was using this set library golang-set. I get the following error when trying to create a set:

invalid operation: cannot index mapset.NewSet (value of type func(s ...interface{}) mapset.Set)

Here is the full code

package main

import (
    mapset "github.com/deckarep/golang-set"
)

func main() {
    mySet := mapset.NewSet[string]()

}

I'm using go version 1.18.2 on Ubuntu, the code is exactly how it appears on the documentation.

Please log in or register to answer this question.

Welcome to Bioimagingcore Q&A, where you can ask questions and receive answers from other members of the community.
...