gomodci

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 2 Imported by: 0

README

GitLab CI/CD Demo For Go Modules

pipeline status coverage report

Go Mod 使用 GitLab CI/CD 样例

image
image: golang:latest
variables
variables:
  REPO_NAME: gitlab.com/zanderwong/gomodci
  REPO_DOMAINNAME: gitlab.com
  REPO_NAMESPACE: zanderwong
  REPO_PROJECTNAME: gomodci
before_script
before_script:
  - export GO111MODULE=auto
  - export GOPROXY=https://goproxy.io,direct
  - mkdir -p $GOPATH/src/$REPO_DOMAINNAME/$REPO_NAMESPACE
  - cp -r $CI_PROJECT_DIR $GOPATH/src/$REPO_DOMAINNAME/$REPO_NAMESPACE
  - cd $GOPATH/src/$REPO_NAME
  - go mod vendor
stages
stages:
  - test
  - build
  - deploy
format
format:
  stage: test
  script:
    - go fmt $(go list ./... | grep -v /vendor/)
    - go vet $(go list ./... | grep -v /vendor/)
compile
compile:
  stage: build
  script:
    - go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/$REPO_PROJECTNAME
  artifacts:
    paths:
      - $REPO_PROJECTNAME

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
@APIVersion 1.0.0 @Title beego Test API @Description beego has a very cool tools to autogenerate documents for your API @Contact astaxie@gmail.com @TermsOfServiceUrl http://beego.me/ @License Apache 2.0 @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
@APIVersion 1.0.0 @Title beego Test API @Description beego has a very cool tools to autogenerate documents for your API @Contact astaxie@gmail.com @TermsOfServiceUrl http://beego.me/ @License Apache 2.0 @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL