You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

banner.go 1.8 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright © 2023 OpenIM open source community. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package utils
  15. import (
  16. "fmt"
  17. "github.com/Delta456/box-cli-maker/v2"
  18. "github.com/OpenIMSDK/OpenKF/server/internal/config"
  19. )
  20. func OpenKFBanner() {
  21. // logo
  22. logo := `
  23. _______ ______ ____________
  24. __ __ \________ _____ _______ ___ //_/___ ____/
  25. _ / / /___ __ \_ _ \__ __ \__ ,< __ /_
  26. / /_/ / __ /_/ // __/_ / / /_ /| | _ __/
  27. \____/ _ .___/ \___/ /_/ /_/ /_/ |_| /_/
  28. /_/
  29. APP Mode:
  30. - Version: %s
  31. - Debug: %v
  32. - Log file: %s
  33. Github repo: https://github.com/OpenIMSDK/OpenKF.
  34. Official website: https://https://www.openim.online/en
  35. OpenKF Slack: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg (OpenKF clannels)
  36. 🎉🎉 Welcome to your contribution :)
  37. Copyright © 2023 OpenIM open source community. All rights reserved.
  38. Licensed under the Apache License (the "License");
  39. `
  40. content := fmt.Sprintf(logo, config.Config.App.Version, config.Config.App.Debug, config.Config.App.LogFile)
  41. Box := box.New(box.Config{
  42. Px: 5,
  43. Py: 0,
  44. Type: "Round",
  45. Color: "Cyan",
  46. TitlePos: "Top",
  47. })
  48. Box.Print("OpenIM Community", content)
  49. }