另客网go项目公用的代码库

123456789101112131415161718192021222324252627
  1. package hooks
  2. import (
  3. "fmt"
  4. "testing"
  5. "time"
  6. "github.com/sirupsen/logrus"
  7. )
  8. func FTestClient_Notify(t *testing.T) {
  9. NewClient("127.0.0.1", 8085)
  10. resp, err := defaultClient.Notify(&NotifyRequest{
  11. Project: "xxx",
  12. Maintainers: []string{"x", "Y"},
  13. Message: "message",
  14. Time: time.Now().String(),
  15. })
  16. if err != nil {
  17. fmt.Println("err===>", err)
  18. }
  19. logrus.Debug()
  20. fmt.Println("resp===>", resp)
  21. }