本文介绍: goLand 安装 及警告解决

概述

选择版本安装

go 安装的版本 1.go安装及相关配置

goLand 对于 习惯 idea 系列使用的人,还是很友好的。

测试代码

package main

import (
	"flag"
	"fmt"
	"os"
)

func main() {

	name := flag.String("name", "world", "specify the name you want to say hi")
	flag.Parse()
	fmt.Println("os args is:", os.Args)
	fmt.Println("input parameter is:", *name)
	fullString := fmt.Sprintf("Hello %s from Gon", *name)
	fmt.Println(fullString)
}

下面有警告
在这里插入图片描述

解决

appledeMacBook-Pro:~ hyl$ go get -u github.com/go-delve/delve/cmd/dlv
appledeMacBook-Pro:bin hyl$ ls
dlv	gocode
appledeMacBook-Pro:bin hyl$ pwd
/Users/hyl/go/bin
appledeMacBook-Pro:bin hyl$ 

GoLand Help->Edit Cusom Properties…
在这里插入图片描述
重启 goLand

解决如下
在这里插入图片描述

外配置参数

通过下面这种方式,可以达到无参数时默认配置,有参数时,参数生效,在 k8s 中常见。
在这里插入图片描述
在这里插入图片描述

结束

goLand 安装至此结束,易装易用,就是费钱。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注