# demo-code **Repository Path**: facengineer/demo-code ## Basic Information - **Project Name**: demo-code - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-17 - **Last Updated**: 2024-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # demo-code #### 介绍 基于Tekton构建的golang Gin API案例项目 ``` git clone https://gitee.com/facengineer/demo-code.git ``` #### 项目说明 API接口如下: - /healthz: 服务健康状态 - /api/v1/index: 业务1 - /api/v2/index: 业务2 代码目录结构: ``` |- ci: |- Dockerfile |- prepare_build.sh |- cmd: |- api |- main.go # API服务入口 |- helper |- pkg |- routing # 路由表定义 |- handler # 业务 ``` #### 本地执行方式 ``` go mod tidy go run cmd/api/main.go ``` #### Docker & Tekton 构建 ``` Dockerfile路径:ci/ 执行脚本: cd ci/ && bash prepare_build.sh docker build -t docker.io/library/demo-code:latest . ```