what a rabbithole. lots of goodies now.

This commit is contained in:
2021-12-18 04:23:35 -05:00
parent 11b0744e5c
commit 8f582d37f1
24 changed files with 399 additions and 326 deletions

View File

@@ -0,0 +1,31 @@
package main
import (
"bytes"
"io"
"net/http"
_ "r00t2.io/sysutils/.net.UNFINISHED/ports"
)
func download(url string) (b *[]byte, err error) {
var resp *http.Response
var buf bytes.Buffer
b = &[]byte{}
if resp, err = http.Get(url); err != nil {
return
}
defer resp.Body.Close()
if _, err = io.Copy(&buf, resp.Body); err != nil {
return
}
*b = buf.Bytes()
return
}
func (ports *PortSet) parse(src *[]byte, outBytes *[]byte)