From 6e1ad53a3bb2d20053cdf43605baf309f2af9466 Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Thu, 26 May 2016 21:36:23 +0200 Subject: [PATCH] Add support for ddclient Fixes #16 --- api/api.go | 2 +- api/api_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index b2fe8dd..175c988 100644 --- a/api/api.go +++ b/api/api.go @@ -19,7 +19,7 @@ import ( const APPLICATION_JSON = "application/json" var USER_AGENT_RE = regexp.MustCompile( - `^(?:curl|Wget|fetch\slibfetch|Go-http-client|HTTPie)\/.*|Go\s1\.1\spackage\shttp$`, + `^(?:curl|Wget|fetch\slibfetch|ddclient|Go-http-client|HTTPie)\/.*|Go\s1\.1\spackage\shttp$`, ) type API struct { diff --git a/api/api_test.go b/api/api_test.go index efe8c66..8de94e2 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -151,6 +151,7 @@ func TestCLIMatcher(t *testing.T) { {"Go 1.1 package http", true}, {"Go-http-client/1.1", true}, {"Go-http-client/2.0", true}, + {"ddclient/3.8.3", true}, {browserUserAgent, false}, } for _, tt := range tests {