error.go

 1// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved.
 2//
 3// This program is free software; you can redistribute it and/or
 4// modify it under the terms of The BSD 3-Clause License
 5// that can be found in the LICENSE file.
 6
 7package uritemplate
 8
 9import (
10	"fmt"
11)
12
13func errorf(pos int, format string, a ...interface{}) error {
14	msg := fmt.Sprintf(format, a...)
15	return fmt.Errorf("uritemplate:%d:%s", pos, msg)
16}