return.go 453 B

1234567891011121314151617181920
  1. // Copyright 2025 BackendServerTemplate Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package main
  5. import "log"
  6. const exitCodeSuccess = 0
  7. const exitCodeFailed = 1
  8. func ReturnError(err error) int {
  9. log.Printf("generate: error: %s\n", err.Error())
  10. return exitCodeFailed
  11. }
  12. func ReturnSuccess() int {
  13. log.Println("generate: success!")
  14. return exitCodeSuccess
  15. }