如何使用从另一个包导入的结构

Well, I have my struct Player in package Player

package Player

type Player struct {
    name         string
    speciality   string
}

And I have my main function in package main

package main

import "pack/Player"   

func main() {   
   var player Player.Player
   fmt.Print(player.name)
}

But after I compile it I get

player.name undefined (cannot refer to unexported field or method name)

What I am doing wrong?

You need to export the fields of your structure in order for them to be accessible by having them start with upper case characters:

type Player struct {
    Name         string
    Speciality   string
}