File: main.go

package info (click to toggle)
golang-github-dpotapov-go-spnego 0.0~git20190506.c2c6091-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, bullseye-backports, forky, sid, trixie
  • size: 92 kB
  • sloc: makefile: 3
file content (27 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

import (
	"fmt"
	"net/http"
	"os"

	"github.com/dpotapov/go-spnego"
)

func main() {
	c := &http.Client{
		Transport: &spnego.Transport{},
	}

	if len(os.Args) < 2 {
		fmt.Printf("Usage:\n\t%s <URL>\n", os.Args[0])
		return
	}

	resp, err := c.Get(os.Args[1])
	if err != nil {
		panic(err)
	}

	fmt.Print(resp.Status)
}