From ec323fa5180048cfa08b2e75214c0b907b9cf164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Sat, 7 Jul 2018 15:15:06 +0200 Subject: [PATCH] targets: Introduce constants for different formats --- lib/targets.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/targets.go b/lib/targets.go index 16a9c2df..9bc8dfbe 100644 --- a/lib/targets.go +++ b/lib/targets.go @@ -48,6 +48,13 @@ var ( ErrNilTarget = errors.New("nil target") ) +const ( + // HTTPTargetFormat is the human readable identifier for the HTTP target format. + HTTPTargetFormat = "http" + // JSONTargetFormat is the human readable identifier for the JSON target format. + JSONTargetFormat = "json" +) + // A Targeter decodes a Target or returns an error in case of failure. // Implementations must be safe for concurrent use. type Targeter func(*Target) error