Golang学习日志 ━━ LiteIDE的主要配置

用LiteIDE开发golang半年换到VSCode,vs用了一年多后,最近又用回LiteIDE,感觉还是针对性强的IDE用起来舒适,界面什么不重要。

我个人一般什么东西都喜欢用默认配置,能不改的就不改,所以这里只举出我觉得更改会让使用起来更得心应手相关的配置。

安装

下载地址:http://liteide.org/

根据系统下载解压后直接可用,方便的很。

编译环境配置

Golang本身的配置就很简单,如果直接写的话用网上这篇教程里的内容:
go在64位环境下编译出32位程序
Go语言环境配置
Golang学习日志 ━━ 下载及安装

  • 如果用LiteIDE则选择菜单 -> 工具 -> 选择环境,
  • 如果对该环境需要进行配置,则选择菜单 -> 工具 ->编辑当前环境,在左侧文件系统窗口中可以对其它几种环境进行编辑,便于以后快速切换选择不同环境
    在这里插入图片描述

编辑器颜色方案

平时一般都用notepad++,喜欢深色背景,好在LiteIDE也提供了,选择菜单 -> 查看 -> 选项 -> LiteEditor -> 字体和颜色 -> 编辑器颜色方案
在这里插入图片描述

自动导入包

初学的时候尽量自己写import,可是实际开发的时候,直接写代码,就不要去考虑导入或不导入包的事情了,系统自动安排是最舒服的,选择菜单 -> 查看 -> 选项 -> GolangFmt -> 允许更新import行(打勾)
在这里插入图片描述

代理

  • 方法一:功能设置
    菜单 -> 工具 -> 管理GOPATH/modules… -> 自定义 GOPROXY
    在这里插入图片描述
  • 方法二:环境编辑
    菜单 -> 工具 -> 编辑当前环境
    网上推荐:GOPROXY=https://mirrors.aliyun.com/goproxy/
    与命令行中输入go env后set是一样的。
    在这里插入图片描述
    其他proxy可以试试这个:
    https://goproxy.io/zh/docs/getting-started.html
    Go proxy 设置

GO MODULE

go-module的使用

常用按钮

在这里插入图片描述
常用golang命令就隐藏在这些快捷工具中,详细参考:https://www.jianshu.com/p/5570840919bc
自己查看的话,比如mod的命令有8个,则输入go mod

c:\project\test>go mod
Go mod provides access to operations on modules.

Note that support for modules is built into all the go commands,
not just 'go mod'. For example, day-to-day adding, removing, upgrading,
and downgrading of dependencies should be done using 'go get'.
See 'go help modules' for an overview of module functionality.

Usage:

        go mod <command> [arguments]

The commands are:

        download    download modules to local cache
        edit        edit go.mod from tools or scripts
        graph       print module requirement graph
        init        initialize new module in current directory
        tidy        add missing and remove unused modules
        vendor      make vendored copy of dependencies
        verify      verify dependencies have expected content
        why         explain why packages or modules are needed

Use "go help mod <command>" for more information about a command.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值