8000 feat[tcpx]: Wait for the host to time out and exit by mumuhhh · Pull Request #23 · toolkits/pkg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat[tcpx]: Wait for the host to time out and exit #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

mumuhhh
Copy link
Contributor
@mumuhhh mumuhhh commented Dec 17, 2024

No description provided.

net/tcpx/tcpx.go Outdated
hosts = strings.ReplaceAll(hosts, ",", " ")
array := strings.Fields(hosts)
return &Config{
Hosts: strings.Split(hosts, ","),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面已经把逗号替换成空格了,这里就要用 strings.Fields 了。一般我喜欢 strings.Fields 是因为可以处理各种空白字符,有时用户可能写的内容多了一个空格,用 strings.Fields 很方便处理

@UlricQin UlricQin merged commit d66dffa into toolkits:master Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0