error.go 414 B

12345678910111213141516
  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. package uritemplate
  7. import (
  8. "fmt"
  9. )
  10. func errorf(pos int, format string, a ...interface{}) error {
  11. msg := fmt.Sprintf(format, a...)
  12. return fmt.Errorf("uritemplate:%d:%s", pos, msg)
  13. }