Mac安装brew, Golang, vscode

刚刚拆了新机,准备安装 golang:

brew install Golang

但是报错如下:

brew ommand 

安装brew

https://brew.sh/index_zh-cn

把brew安装好以后,安装golang,使用上面的第一条命令

 

mac安装vscode

brew cask install visual-studio-code

安装了vscode以后配置golang环境,这个很多资料都有,我就不说了,比如:https://www.jianshu.com/p/83beca927c9e

配置以后还需要去修改setting.json.

我的是这样配置的,不知道是否正确哈,反正目前能满足需求,仅供参考:

{
    "go.buildOnSave": true,
    "go.lintOnSave": true,
    "go.vetOnSave": true,
     "go.formatOnSave": true,
    "go.formatTool": "goreturns",
    "go.goroot": "/usr/local/Cellar/go/1.12/libexec",// 你的Goroot
    "go.gopath": "/Users/katy.xie/go/",// gopath
    "workbench.startupEditor": "newUntitledFile",
    "extensions.ignoreRecommendations": false,
    "window.zoomLevel": 0,
    //"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    "go.inferGopath": true,
    "go.gotoSymbol.includeImports": true,
    "go.gotoSymbol.includeGoroot": true,
    //"go.formatTool": "gofmt",
    "go.autocompleteUnimportedPackages": true,
    "go.useCodeSnippetsOnFunctionSuggest": true,
    // 文件自动保存
    "files.autoSave": "onFocusChange",
    // 行号区域颜色设置
    "workbench.colorCustomizations": {
        "editorLineNumber.foreground": "#b1ae97",
        "editorGutter.background": "#282928",
        "editorCursor.foreground": "#e6ebe7"
    },
    // python自动提示时,选中函数自动添加括号
   // "python.autoComplete.addBrackets": true,
    // golang自动提示时,选中函数自动添加括号以及参数提示(提示不包含参数类型)
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    // go test显示打印信息
    "go.testFlags": ["-v"],
    // go add tags配置
    "go.addTags": {
        // tag名称,多个以","隔开
        "tags": "json,fname",
        // 只添加字段名字
        "options": "json=",
        // 添加tag前提示关闭
        "promptForTags": false,
        "transform": "snakecase"
    },
    // go 代码实时检查错误配置
    "go.liveErrors": {
        "enabled": true,
        "delay": 500
    },
     // cpp标准设置为c++11
     "C_Cpp.default.cppStandard": "c++11",
     // todohighlight 生效文件后缀 keyword="TODO:"
     "todohighlight.include": [
         "**/*.js",
         "**/*.jsx",
         "**/*.ts",
         "**/*.tsx",
         "**/*.html",
         "**/*.php",
         "**/*.css",
         "**/*.scss",
         "**/*.go",
         "**/*.py",
         "**/*.cpp"
     ]
    } 

mac安装mysql

方式一:下载mysql的安装包:

https://dev.mysql.com/downloads/file/?id=484914

方式二:使用brew安装mysql,参考:https://www.jianshu.com/p/c64e309330a5

brew install mysql // 如果没有指定版本,那么就默认安装最新版的

重置mysql 密码:https://www.jb51.net/article/136696.htm

1.关闭mysql 服务

brew services stop mysql

 

未完待续。。。。。

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值