摘要:
package main import ( "fmt" "io" "log" "net/http" "os" "regexp" "strings" "sync" ) func gomoun(c chan int) { for i := 0; i < 10000; i++ { c <- i } clo 阅读全文
摘要:
func findStr() { testStr := "There are 123 apples and 456 oranges." // 查找所有匹配的子字符串 pattern := `\d+` // 匹配一个或多个数字 re := regexp.MustCompile(pattern) // 阅读全文
摘要:
resp, err := client.Do(req) if err != nil { results <- fmt.Sprintf("Request error: %v", err) return } defer resp.Body.Close() bodyText, err := io.Read 阅读全文