23 lines
285 B
Go
23 lines
285 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"fmt"
|
||
|
|
)
|
||
|
|
|
||
|
|
type App struct {
|
||
|
|
ctx context.Context
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewApp() *App {
|
||
|
|
return &App{}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (a *App) startup(ctx context.Context) {
|
||
|
|
a.ctx = ctx
|
||
|
|
}
|
||
|
|
|
||
|
|
func (a *App) Greet(name string) string {
|
||
|
|
return fmt.Sprintf("Hello %s, It's show time!", name)
|
||
|
|
}
|