package app import ( "log" "reflect" cdr "git.loafle.net/commons/di-go/registry" annotation "git.loafle.net/totopia/server/pkg/loafer/app/annotation" ) func Run(t reflect.Type) { ta := cdr.GetTypeAnnotation(t, annotation.ServerAnnotationType) if nil == ta { log.Printf("[%s] is not Server, use @app:Server", t.Elem().Name()) return } vta := ta.(*annotation.ServerAnnotation) log.Printf("%s %d", t.Elem().Name(), vta.HTTPPort) }