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

未完待续。。。。。

猜你喜欢

转载自blog.csdn.net/u010918487/article/details/88169683