1
0
mirror of https://gitee.com/willfree/mlsr.git synced 2026-06-05 22:39:31 +08:00

测试HelloProtocol文件

This commit is contained in:
pxy
2022-07-08 21:57:50 +08:00
parent c586f5cd3c
commit cc8a8d2fb1
+23
View File
@@ -0,0 +1,23 @@
//package cmd
//@Author: Pei Xinyuan
//@Description:
//@Version: 0.1.0
//@Date: 2022/6/24 17:50:00
//@Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
package cmd
import "github.com/AlecAivazis/survey/v2"
func AskPassword() (string, error) {
return AskPasswordWithCustomMsg("Please type your password")
}
func AskPasswordWithCustomMsg(msg string) (string, error) {
passwd := ""
prompt := &survey.Password{
Message: msg,
}
err := survey.AskOne(prompt, &passwd)
return passwd, err
}