windport/cmd/wsp/main.go
2023-08-13 23:27:48 -04:00

31 lines
409 B
Go

package main
import (
"context"
"encoding/json"
"log"
"os"
"dynatron.me/x/windport/pkg/windscribe"
)
func main() {
a := windscribe.Auth{}
err := json.NewDecoder(os.Stdin).Decode(&a)
if err != nil {
log.Fatal(err)
}
c := windscribe.New()
ctx := context.Background()
err = c.Auth(ctx, a)
if err != nil {
log.Fatal(err)
}
err = c.MatchingPort(ctx)
if err != nil {
log.Fatal(err)
}
}