1
0
mirror of https://github.com/fumiama/go-nd-portal.git synced 2026-06-24 04:30:24 +08:00

chore(lint): 改进代码样式 (#2)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-05-18 21:04:57 +09:00
committed by GitHub
parent 0fb9dda436
commit 7b844523eb
3 changed files with 105 additions and 109 deletions

View File

@@ -101,7 +101,7 @@ func Main() {
}
logrus.Debugf("server addr: %s, login type: %s", *s, *t)
if *s != portal.PortalServerIPQsh {
// just validate IP here,
// just validate IP here,
// dont convert to net.IP because we need only its string later
_, err := netip.ParseAddr(*s)
if err != nil {
@@ -109,8 +109,8 @@ func Main() {
os.Exit(line())
}
}
// n : username
// p: password
// n : username
// p: password
// ip : public ip
// *t : login type
ptl, err := portal.NewPortal(*n, *p, ip, portal.LoginType(*t))
@@ -125,7 +125,7 @@ func Main() {
logrus.Errorln(err)
os.Exit(line())
}
// input:
// input:
// server IP
// challenge
err = ptl.Login(*s, challenge)