fork download
  1.  
  2. package main
  3.  
  4. import "fmt"
  5.  
  6. // Deprecated function
  7. // deprecated: "use NewFunction instead"
  8.  
  9. func OldFunction() {
  10. fmt.Println("This is the deprecated function. Use NewFunction instead.")
  11. NewFunction()
  12. }
  13.  
  14. // New function
  15. func NewFunction() {
  16. fmt.Println("This is the new function.")
  17. }
  18.  
  19. func main() {
  20. // Call the deprecated function
  21. OldFunction()
  22.  
  23. // Call the new function directly
  24. NewFunction()
  25. }
  26.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
This is the deprecated function. Use NewFunction instead.
This is the new function.
This is the new function.