summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2016-12-19 09:14:29 +0800
committerruki <[email protected]>2017-01-06 17:20:08 +0800
commitf7a4d5e18d50ccaa23adfcb06358f9368770ed6a (patch)
tree31cb4924c35ad3ed7b81dd8fda337fb6648dcc30 /tests
parent3ec8380e312ebfd82a359632ad660fb842b9211d (diff)
add golang
Diffstat (limited to 'tests')
-rw-r--r--tests/console_go/src/main.go22
-rwxr-xr-xtests/console_go/xmake.lua32
2 files changed, 54 insertions, 0 deletions
diff --git a/tests/console_go/src/main.go b/tests/console_go/src/main.go
new file mode 100644
index 000000000..c91ae5091
--- /dev/null
+++ b/tests/console_go/src/main.go
@@ -0,0 +1,22 @@
+/*!The Qiyi Golang Backend Server
+ *
+ * Copyright (C) 2016, qiyi.com All rights reserved.
+ *
+ * @author ruki
+ * @file main.go
+ *
+ */
+package main
+
+/* /////////////////////////////////////////////////////////////////////////////////////////////////
+ * imports
+ */
+import "fmt"
+
+/* /////////////////////////////////////////////////////////////////////////////////////////////////
+ * main
+ */
+func main() {
+
+ fmt.Println("hello xmake for go!")
+}
diff --git a/tests/console_go/xmake.lua b/tests/console_go/xmake.lua
new file mode 100755
index 000000000..d69c3d457
--- /dev/null
+++ b/tests/console_go/xmake.lua
@@ -0,0 +1,32 @@
+-- the debug mode
+if is_mode("debug") then
+
+ -- enable the debug symbols
+ set_symbols("debug")
+
+ -- disable optimization
+ set_optimize("none")
+end
+
+-- the release mode
+if is_mode("release") then
+
+ -- set the symbols visibility: hidden
+ set_symbols("hidden")
+
+ -- enable fastest optimization
+ set_optimize("fastest")
+
+ -- strip all symbols
+ set_strip("all")
+end
+
+-- add target
+target("console_go")
+
+ -- set kind
+ set_kind("binary")
+
+ -- add files
+ add_files("src/*.go")
+