如果存在没有方法的类型,您可以将其视为对象吗?

To have an object do we need to have both a type declaration and a method?

 type IntSet { 
         words []uint64
    }

func (s *IntSet) Method(x int) int {}

i.e you declare a type:

type IntSet { 
     words []uint64
}

but leave it as is can this still be considered a object?

Typically an object an instance of any type. A type without methods is still a type it is just explaining what it holds and what can manipulate it.

You might be thinking of classes which golang technically doesn't have but you can think of types + methods as classes-ish. Without the methods they are closer to structs.

The combination of a type declaration and a method definition doesn't instantiate any memory. So there's no "object" in either the former or the latter case.

To make an "object" in the golang-sense, you have to use new() or make() or the literal syntax, which creates an "instance" of the type and assigns it to a var:

intset := IntSet{ words: []uint64{1,2,3,4} }

https://play.golang.org/p/BFdRL2HBbRp