Skip to content

Commit

Permalink
targets: Introduce constants for different formats
Browse files Browse the repository at this point in the history
  • Loading branch information
tsenart committed Jul 7, 2018
1 parent a7df0cf commit ec323fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec323fa

Please sign in to comment.