feat: 添加UPF N3 Ping测试功能

This commit is contained in:
TsMask
2025-09-12 15:23:03 +08:00
parent 0ff49d198d
commit ed4ea06e2e
5 changed files with 183 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ type Ping struct {
}
// setDefaultValue 设置默认值
func (p *Ping) setDefaultValue() {
func (p *Ping) SetDefaultValue() {
if p.Interval < 1 || p.Interval > 10 {
p.Interval = 1
}
@@ -39,7 +39,7 @@ func (p *Ping) setDefaultValue() {
// NewPinger ping对象
func (p *Ping) NewPinger() (*probing.Pinger, error) {
p.setDefaultValue()
p.SetDefaultValue()
pinger, err := probing.NewPinger(p.DesAddr)
if err != nil {