What does 'x.(T)' syntax supposed to mean in Go?

It is called type assertion. Here is how it looks like:

1str := value.(string)

It gives you access to the interface’s concrete value. It asserts if the values stored in x is of type T and that x is not nil.

Type assertion can also return two values: the concrete underlying value and a boolean value that check if the assertion is true.

1t, ok := x.(T)

Here is some code examples for a much easier references. It is a similar example as the one you can find in A Tour of Go

 1    var i interface{} = "hello"
 3    s := i.(string)
 4    fmt.Println(s)
 5    // Will prints out: hello
 7    s, ok := i.(string)
 8    fmt.Println(s, ok)
 9    // Will prints out: hello, true
11    f, ok := i.(float64)
12    fmt.Println(f, ok)
13    // Will prints out: 0, false
15    f = i.(float64)
16    fmt.Println(f)
17    // Will cause "panic"
18    // panic: interface conversion: interface {} is string, not float64

Additional references: