本地起 mysql server 后,会发现外部 host 连不了,这个时候可以考虑开放权限。但 8.0 之后无法直接通过 GRANT 创建 user,可以采用下面的命令: mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'PASSWORD'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES;
Dig is a DI library. It has all the core logic Fx needs for actually performing DAG resolution of dependencies, type decorations and resolutions, etc.
Fx is an DI-based application framework. Fx uses Dig to perform the core DI operations, and it comes with built-in utilities (such as Lifecycle and Loggers) that are useful when you are building an app.
At Uber we use Fx to build services and libraries that powers most of our backend.
推荐一个 goimport 自动规范的 cli 工具,本地库,第三方库,系统库,规则虽然简单,很多工具却不能满足需求。goimports-revisor 还是挺好用的:github.com。可以format单个文件,也可以format 一个文件夹,基于 go mod 探测当前的本地库。用起来类似这样: