瀏覽代碼

add name and version

fancl 1 年之前
父節點
當前提交
eb4c287da0
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      instance.go

+ 10 - 0
instance.go

@@ -40,6 +40,16 @@ func Http() *http.Server {
 	return std.Http()
 }
 
+func Name() string {
+	initApplication()
+	return std.opts.Name
+}
+
+func Version() string {
+	initApplication()
+	return std.opts.Version
+}
+
 func Debug() bool {
 	initApplication()
 	return std.opts.EnableDebug