编程笔记 GOLANG基础 004 GOLANG常用命令及VSCODE快捷键

简介: 编程笔记 GOLANG基础 004 GOLANG常用命令及VSCODE快捷键

在编写go语言代码之前,记住一些常用的方法,可以产生事半功倍的效果,如go语言开发程序的一些常用命令和开发工具的一些快捷键,之后还有编程的一些加速方法等。

一、GOLANG常用命令

直接在终端中输入 go help 即可显示所有的 go 命令以及相应命令功能简介。

PS D:\gott> go help
Go is a tool for managing Go source code.
Usage:
        go <command> [arguments]
The commands are:
        bug         start a bug report
        build       compile packages and dependencies
        clean       remove object files and cached files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         update packages to use new APIs
        fmt         gofmt (reformat) package sources
        generate    generate Go files by processing source
        get         add dependencies to current module and install them      
        install     compile and install packages and dependencies
        list        list packages or modules
        mod         module maintenance
        work        workspace maintenance
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         report likely mistakes in packages
Use "go help <command>" for more information about a command.
Additional help topics:
        buildconstraint build constraints
        buildmode       build modes
        c               calling between Go and C
        cache           build and test caching
        environment     environment variables
        filetype        file types
        go.mod          the go.mod file
        gopath          GOPATH environment variable
        gopath-get      legacy GOPATH go get
        goproxy         module proxy protocol
        importpath      import path syntax
        modules         modules, module versions, and more
        module-get      module-aware go get
        module-auth     module authentication using go.sum
        packages        package lists and patterns
        private         configuration for downloading non-public code        
        testflag        testing flags
        testfunc        testing functions
        vcs             controlling version control with GOVCS
Use "go help <topic>" for more information about that topic.
PS D:\gott> 

需要的话自行翻译一下。

二、VSCODE快捷键

按ctrl+k,ctrl+s,即可显示键盘快捷方法列表。

常用快捷键

  1. 行注释 ctrl + /
  2. 块注释 shift+alt+a (可以修改为ctrl+shift+/)
  3. ctrl+a 全选
  4. ctrl+c 复制
  5. ctrl+v 粘贴
  6. ctrl+shift+k 删除行
  7. ctrl+e查找文件
  8. ctrl+shift+p 打开设置命令行
    修改快捷键
    双击要修改的快捷键,不建议修改。
相关文章
|
1月前
|
人工智能 自然语言处理 算法
国产新型AI编程助手—DevChat AI插件在VSCode中的应用
国产新型AI编程助手—DevChat AI插件在VSCode中的应用
|
19天前
设置VSCode代码编辑器右侧的Minimap代码缩略图滚动条切换显示、隐藏的快捷键Alt+M
设置VSCode代码编辑器右侧的Minimap代码缩略图滚动条切换显示、隐藏的快捷键Alt+M
|
2天前
|
SQL 关系型数据库 MySQL
Golang数据库编程详解 | 深入浅出Go语言原生数据库编程
Golang数据库编程详解 | 深入浅出Go语言原生数据库编程
|
19天前
VSCode设置合并行快捷键
VSCode设置合并行快捷键
|
1月前
|
JSON 编解码 Go
Golang中http编程
Golang中http编程
26 2
|
1月前
|
存储 IDE 编译器
编程笔记 GOLANG基础 005 第一个程序:hello world 使用vscode
编程笔记 GOLANG基础 005 第一个程序:hello world 使用vscode
|
3月前
|
人工智能 JavaScript 程序员
Fitten Code:在VSCode插件市场备受欢迎的原因是什么?
随着AI技术的不断发展,AI在编写代码方面的能力也日益强大。充分利用AI的能力能够显著提高代码编写的效率和质量。今天我将向大家介绍一款备受瞩目的AI代码神器——Fitten Code,让我们一同揭开它神秘的面纱!
282 3
|
19天前
Vscode 插件-代码敲出不同的特效
Vscode 插件-代码敲出不同的特效
|
1月前
|
NoSQL 关系型数据库 开发工具
最新最全 VSCODE 插件推荐(2023版)
最新最全 VSCODE 插件推荐(2023版)
118 0