deepMerge.js 843 B

12345678910111213141516171819202122232425262728293031
  1. // 此库来自 https://www.uviewui.com/js/intro.html
  2. import deepClone from "./deepClone";
  3. // JS对象深度合并
  4. function deepMerge(target = {}, source = {}) {
  5. target = deepClone(target);
  6. if (typeof target !== 'object' || typeof source !== 'object') return false;
  7. for (var prop in source) {
  8. if (!source.hasOwnProperty(prop)) continue;
  9. if (prop in target) {
  10. if (typeof target[prop] !== 'object') {
  11. target[prop] = source[prop];
  12. } else {
  13. if (typeof source[prop] !== 'object') {
  14. target[prop] = source[prop];
  15. } else {
  16. if (target[prop].concat && source[prop].concat) {
  17. target[prop] = target[prop].concat(source[prop]);
  18. } else {
  19. target[prop] = deepMerge(target[prop], source[prop]);
  20. }
  21. }
  22. }
  23. } else {
  24. target[prop] = source[prop];
  25. }
  26. }
  27. return target;
  28. }
  29. export default deepMerge;
PANIC: session(release): write data/sessions/d/0/d0e70a8dfea1407d: no space left on device

PANIC

session(release): write data/sessions/d/0/d0e70a8dfea1407d: no space left on device
/root/go/pkg/mod/github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8bc0f8)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:81 (0x83623b)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80b5f4)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80b51c)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:125 (0x8363b2)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:115 (0x8473a6)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/recovery.go:161 (0x84739d)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/logger.go:40 (0x839a24)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80b5f4)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80b51c)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:125 (0x8363b2)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/router.go:187 (0x8412dd)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/router.go:304 (0x8423ec)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/macaron.go:218 (0x83adde)
/usr/local/btgo/src/net/http/server.go:2936 (0x7b23b5)
	serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/btgo/src/net/http/server.go:1995 (0x7add91)
	(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/btgo/src/runtime/asm_amd64.s:1598 (0x47e160)
	goexit: BYTE	$0x90	// NOP