panic: reading /etc/services
Similar to #9, when the `/etc/services` file is not formatted correctly, this project will panic trying to parse the file. ## History Issue #9 was filed a year ago and linked to a non-English issue. Putting it through [google translate](https://github-com.translate.goog/Mrs4s/go-cqhttp/discussions/1024?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp) reveals that in the users `/etc/services` file there is the following entry at the end: ``` privoxy 8118 ``` Which does not follow the typical format of `port/protocol` (e.g. `21/tcp`). I am a maintainer of [telegraf](https://github.com/influxdata/telegraf/) and recently received a [similar issue](https://github.com/influxdata/telegraf/issues/12084), where the user had the same line in their `/etc/services` file. ## Steps to reproduce 1. Update `/etc/services` file to include `privoxy 8118` 2. Create the following `main.go`: ```go package main import _ "modernc.org/libc" func main() {} ``` 3. The following `go.mod`: ```go module test go 1.19 require modernc.org/libc v1.21.1 ``` 4. Run `go run main.go` 5. Remember to revert your change to `/etc/services` ## Logs ``` panic: runtime error: index out of range [1] with length 1 goroutine 1 [running]: modernc.org/libc/honnef.co/go/netdb.init.0() /go/pkg/mod/modernc.org/libc@v1.20.3/honnef.co/go/netdb/netdb.go:760 +0x4c8 ```
issue