hints_enabled.go 434 B

12345678910111213141516171819202122
  1. //go:build hints
  2. // +build hints
  3. package internal
  4. import (
  5. "log"
  6. "runtime"
  7. )
  8. // HintsEnabled is true to indicate that hints are currently switched on.
  9. const HintsEnabled = true
  10. // LogHint reports a developer hint that should be followed to improve their app.
  11. func LogHint(reason string) {
  12. log.Println("Fyne hint: ", reason)
  13. _, file, line, ok := runtime.Caller(2)
  14. if ok {
  15. log.Printf(" Created at: %s:%d", file, line)
  16. }
  17. }