base.go 367 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @ File:
  3. * @ Date: 2021/1/25 10:06
  4. * @ Author: JYQ
  5. * @ Description:
  6. */
  7. package service
  8. import (
  9. "strings"
  10. )
  11. type base struct {
  12. restFulApiBase []string
  13. restFulApi []string
  14. userId int
  15. }
  16. func newBase(ApiBaseUrl string) (b *base) {
  17. b = &base{}
  18. if ApiBaseUrl == "" {
  19. return
  20. }
  21. b.restFulApiBase = strings.Split(ApiBaseUrl, "/")
  22. return
  23. }