fork download
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. // @deprecated Use NewFunction instead
  6. func DeprecatedFunction() {
  7. fmt.Println("This function is deprecated")
  8. NewFunction()
  9. }
  10.  
  11. // New function that replaces the deprecated one
  12. func NewFunction() {
  13. fmt.Println("Using the new function")
  14. }
  15.  
  16. func main() {
  17. // Call the deprecated function
  18. DeprecatedFunction()
  19. }
  20.  
  21.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
This function is deprecated
Using the new function