20 lines
328 B
Go
20 lines
328 B
Go
package handlers
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/metrue/fx/config"
|
|
"github.com/metrue/fx/context"
|
|
)
|
|
|
|
// ListInfra list infra
|
|
func ListInfra(ctx *context.Context) (err error) {
|
|
fxConfig := ctx.Get("config").(*config.Config)
|
|
conf, err := fxConfig.View()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
fmt.Println(string(conf))
|
|
return nil
|
|
}
|