31 lines
586 B
Go
31 lines
586 B
Go
package main
|
|
|
|
import (
|
|
"cicdtest/math"
|
|
"fmt"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("Welcome to the Go testing example!")
|
|
|
|
// 调用 math 包中的 Add 和 Multiply 函数
|
|
sum := math.Add(2, 3)
|
|
product := math.Multiply(2, 3)
|
|
|
|
fmt.Printf("Sum: %d\n", sum)
|
|
fmt.Printf("Product: %d\n", product)
|
|
}
|
|
|
|
// func main() {
|
|
// // 创建一个新的Gin实例
|
|
// r := gin.Default()
|
|
// // 添加路由处理程序
|
|
// r.GET("/hello", func(c *gin.Context) {
|
|
// c.JSON(200, gin.H{
|
|
// "message": "Hello, world! hello hello! test1",
|
|
// })
|
|
// })
|
|
// // 启动Gin服务器
|
|
// r.Run(":8080")
|
|
// }
|