golang

一个golang 基于 interface 链式调用的示例

// 定义一个接口,包含一个接收者为接口类型的方法,该方法返回接口自身以便于链式调用 type Chainable interface { DoSomething() Chainable DoSomething2() Chainable }

67 阅读E Eric chan
前端

vite 打包 执行 build 报 Unexpected token '??='

当前环境 vite 版本 4.2.1 node 版本 14.20.0 通过百度查到 Unexpected token '??=' 是由于node版本太低造成的,使用nvm 升级node 到 18 版本即可解决

68 阅读E Eric chan
前端

nodejs nvm list available 为空

找到nvm的安装目录,打开 settings.txt 文件,添加下面2行配置 node_mirror: https://npm.taobao.org/mirrors/node/ npm_mirror: https://npm.taobao.

53 阅读E Eric chan