> For the complete documentation index, see [llms.txt](https://yingshaoxo.gitbook.io/go-tutorial-for-pythoner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yingshaoxo.gitbook.io/go-tutorial-for-pythoner/the-structure-of-go/first-time-you-meet-him.md).

# First time you meet him

```go
package main

import (
    "fmt"
)

func main() {
    var x string
    x = "Hello"

    y := "world"

    var sentence string = x + ", " + y + "!"

    fmt.Println(sentence)
    fmt.Printf("%s, %s!", y, x)
}
```

## As you can see, Go is a kind of combination of Python, C++, JavaScript.

1. `package`~~, have no idea yet.~~
2. `func main() {}` is like C or C++ codes structure, which without `;` to determine if a statement was finished.
3. `var x string` is like the way of declaring a variable in JavaScript.
4. `y := "world"` is like Python, in there, the compiler will automatically figure out the variable type without you to declare.\
   `fmt.Println()` is like Python's `print()`, and revealed the relationship of `Class` and `Function`.
