_

  • 匿名导包
  • 导包时会触发包内 init方法
  1. _ import "xxx"

.

  • 将包内方法全部导入
  • 使用时不用加包名
  1. . import "xxx"

别名

  • 给导入的包起别名
  1. packageName import "xxx"