constraint.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package version
  2. import (
  3. "strings"
  4. )
  5. type Constraint struct {
  6. operator string
  7. version string
  8. }
  9. // Return a new Constrain and sets operator and version to compare
  10. func NewConstrain(operator, version string) *Constraint {
  11. constraint := new(Constraint)
  12. constraint.SetOperator(operator)
  13. constraint.SetVersion(version)
  14. return constraint
  15. }
  16. // Sets operator to compare
  17. func (self *Constraint) SetOperator(operator string) {
  18. self.operator = operator
  19. }
  20. // Get operator to compare
  21. func (self *Constraint) GetOperator() string {
  22. return self.operator
  23. }
  24. // Sets version to compare
  25. func (self *Constraint) SetVersion(version string) {
  26. self.version = version
  27. }
  28. // Get version to compare
  29. func (self *Constraint) GetVersion() string {
  30. return self.version
  31. }
  32. // Match a given version againts the constraint
  33. func (self *Constraint) Match(version string) bool {
  34. return Compare(version, self.version, self.operator)
  35. }
  36. // Return a string representation
  37. func (self *Constraint) String() string {
  38. return strings.Trim(self.operator+" "+self.version, " ")
  39. }
PANIC: session(release): write data/sessions/9/7/976229af31cc1bda: no space left on device

PANIC

session(release): write data/sessions/9/7/976229af31cc1bda: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)