safe_field.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package reflect2
  2. import (
  3. "reflect"
  4. "unsafe"
  5. )
  6. type safeField struct {
  7. reflect.StructField
  8. }
  9. func (field *safeField) Offset() uintptr {
  10. return field.StructField.Offset
  11. }
  12. func (field *safeField) Name() string {
  13. return field.StructField.Name
  14. }
  15. func (field *safeField) PkgPath() string {
  16. return field.StructField.PkgPath
  17. }
  18. func (field *safeField) Type() Type {
  19. panic("not implemented")
  20. }
  21. func (field *safeField) Tag() reflect.StructTag {
  22. return field.StructField.Tag
  23. }
  24. func (field *safeField) Index() []int {
  25. return field.StructField.Index
  26. }
  27. func (field *safeField) Anonymous() bool {
  28. return field.StructField.Anonymous
  29. }
  30. func (field *safeField) Set(obj interface{}, value interface{}) {
  31. val := reflect.ValueOf(obj).Elem()
  32. val.FieldByIndex(field.Index()).Set(reflect.ValueOf(value).Elem())
  33. }
  34. func (field *safeField) UnsafeSet(obj unsafe.Pointer, value unsafe.Pointer) {
  35. panic("unsafe operation is not supported")
  36. }
  37. func (field *safeField) Get(obj interface{}) interface{} {
  38. val := reflect.ValueOf(obj).Elem().FieldByIndex(field.Index())
  39. ptr := reflect.New(val.Type())
  40. ptr.Elem().Set(val)
  41. return ptr.Interface()
  42. }
  43. func (field *safeField) UnsafeGet(obj unsafe.Pointer) unsafe.Pointer {
  44. panic("does not support unsafe operation")
  45. }
PANIC: session(release): write data/sessions/6/3/6376123fc681857e: no space left on device

PANIC

session(release): write data/sessions/6/3/6376123fc681857e: 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)