Files
fiction/backend/app.go
2026-03-19 23:01:53 +08:00

30 lines
497 B
Go

package backend
import (
"context"
"fmt"
)
// App struct
type App struct {
ctx context.Context
}
// NewApp creates a new App application struct
func NewApp() *App {
return &App{}
}
func (a *App) Startup(ctx context.Context) {
a.ctx = ctx
}
// Greet returns a greeting for the given name
func (a *App) Greet(name string) string {
return fmt.Sprintf("Hello %s, It's show time!", name)
}
func (a *App) Greet2(name string) string {
return fmt.Sprintf("Hello %s, It's show time!", name)
}