Debian Codegraph @

examples/main.go

raw
1 package main
2
3 import (
4 "fmt"
5 "net/http"
6 "os"
7
8 "github.com/dpotapov/go-spnego"
9 )
10
11 func main() {
12 c := &http.Client{
13 Transport: &spnego.Transport{},
14 }
15
16 if len(os.Args) < 2 {
17 fmt.Printf("Usage:\n\t%s <URL>\n", os.Args[0])
18 return
19 }
20
21 resp, err := c.Get(os.Args[1])
22 if err != nil {
23 panic(err)
24 }
25
26 fmt.Print(resp.Status)
27 }