1.18 需要先执行 `go mod init` 否则运行不起来

1.18 需要先执行 go mod init 否则运行不起来。

$ air

  __    _   ___  
 / /\  | | | |_) 
/_/--\ |_| |_| \_ , built with Go 

watching .
!exclude tmp
building...
go: cannot find main module, but found .git/config in /home/wanger/code/go/src/wangdeer/goblog
    to create a module there, run:
    go mod init
failed to build, error: exit status 1
^Ccleaning...
see you again~
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!