diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-03-25 22:14:21 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-03-25 22:14:21 +0100 |
commit | 2cb547d0fa7af0f4570ed4f1286c27243ca31148 (patch) | |
tree | 4011ee251646964058a946a55f4fd35dcaa2a7dd | |
parent | f3999634a5e72a1dcff688d1ba34886d76cdf400 (diff) | |
download | htping-2cb547d0fa7af0f4570ed4f1286c27243ca31148.tar.gz htping-2cb547d0fa7af0f4570ed4f1286c27243ca31148.tar.xz htping-2cb547d0fa7af0f4570ed4f1286c27243ca31148.zip |
preset User-Agent
-rw-r--r-- | htping.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/htping.go b/htping.go index 79dfcfd..c9034f7 100644 --- a/htping.go +++ b/htping.go @@ -27,6 +27,8 @@ import ( "time" ) +const VERSION = "0.1" + var ntotal int32 var flag4 bool @@ -128,6 +130,8 @@ func ping(url string, seq int, results chan result) { return } + req.Header.Set("User-Agent", "htping/" + VERSION) + for _, e := range myHeaders { req.Header.Set(e.key, e.value) } |