parent
a0a164b063
commit
e5922dbfac
@ -1,37 +0,0 @@
|
||||
# This file is a template, and might need editing before it works on your project.
|
||||
image: golang:latest
|
||||
|
||||
variables:
|
||||
# Please edit to your GitLab project
|
||||
REPO_NAME: gitlab.com/namespace/project
|
||||
|
||||
# The problem is that to be able to use go get, one needs to put
|
||||
# the repository in the $GOPATH. So for example if your gitlab domain
|
||||
# is gitlab.com, and that your repository is namespace/project, and
|
||||
# the default GOPATH being /go, then you'd need to have your
|
||||
# repository in /go/src/gitlab.com/namespace/project
|
||||
# Thus, making a symbolic link corrects this.
|
||||
before_script:
|
||||
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
|
||||
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
|
||||
- cd $GOPATH/src/$REPO_NAME
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
||||
format:
|
||||
stage: test
|
||||
script:
|
||||
- go fmt $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- go test -race $(go list ./... | grep -v /vendor/)
|
||||
|
||||
compile:
|
||||
stage: build
|
||||
script:
|
||||
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/mybinary
|
||||
artifacts:
|
||||
paths:
|
||||
- mybinary
|
@ -1,10 +0,0 @@
|
||||
kind: pipeline
|
||||
type: docker # 使用docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: go-library
|
||||
image: golang
|
||||
commands:
|
||||
- go mod tidy
|
||||
- ls -lh
|
@ -1,29 +0,0 @@
|
||||
---
|
||||
stages:
|
||||
- ".pre"
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
- ".post"
|
||||
build-job:
|
||||
stage: build
|
||||
script:
|
||||
- echo "Compiling the code..."
|
||||
- echo "Compile complete."
|
||||
unit-test-job:
|
||||
stage: test
|
||||
script:
|
||||
- echo "Running unit tests... This will take about 60 seconds."
|
||||
- sleep 60
|
||||
- echo "Code coverage is 90%"
|
||||
lint-test-job:
|
||||
stage: test
|
||||
script:
|
||||
- echo "Linting code... This will take about 10 seconds."
|
||||
- sleep 10
|
||||
- echo "No lint issues found."
|
||||
deploy-job:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "Deploying application..."
|
||||
- echo "Application successfully deployed."
|
@ -1,8 +0,0 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- master
|
||||
|
||||
script:
|
||||
- go mod tidy
|
||||
- ls -lh
|
@ -1,43 +0,0 @@
|
||||
## v1.0.16 / 2021-06-07
|
||||
|
||||
- 增加文件/文件夹函数
|
||||
|
||||
## v1.0.14 / 2021-06-04
|
||||
|
||||
- 优化
|
||||
- 增加go.mod
|
||||
- 修复代码
|
||||
|
||||
## v1.0.11 / 2021-05-31
|
||||
|
||||
- 【优化】
|
||||
|
||||
## v1.0.10 / 2021-05-31
|
||||
|
||||
- 【优化】http
|
||||
|
||||
## v1.0.9 / 2021-05-31
|
||||
|
||||
- 【助手】增加http函数
|
||||
|
||||
## v1.0.8 / 2021-05-31
|
||||
|
||||
- 【助手】增加url函数
|
||||
- 【助手】增加规则验证函数
|
||||
- 【助手】优化md5函数
|
||||
|
||||
## v0.0.7 / 2021-05-31
|
||||
|
||||
- 【助手】增加请求函数
|
||||
|
||||
## v0.0.6 / 2021-05-29
|
||||
|
||||
- 【服务】修复拼多多参数
|
||||
|
||||
## v0.0.5 / 2021-05-29
|
||||
|
||||
- 增加拼多多联盟服务
|
||||
|
||||
## v0.0.4 / 2021-05-29
|
||||
|
||||
- 优化
|
@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
@ -1,62 +1,15 @@
|
||||
<img width="100" src="https://kodo-cdn.dtapp.net/04/999e9f2f06d396968eacc10ce9bc8a.png" alt="www.dtapp.net"/>
|
||||
|
||||
<h1><a href="https://www.dtapp.net/">Golang扩展包</a></h1>
|
||||
|
||||
📦 Golang扩展包
|
||||
|
||||
[comment]: <> (dtapps)
|
||||
[![GitHub Org's stars](https://img.shields.io/github/stars/dtapps)](https://github.com/dtapps)
|
||||
|
||||
[comment]: <> (go)
|
||||
[![golang version](https://img.shields.io/badge/golang-%3E%3D1.6-8892BF.svg)](https://pkg.go.dev/github.com/dtapps/go-library)
|
||||
[![godoc](https://pkg.go.dev/badge/github.com/dtapps/go-library?status.svg)](https://pkg.go.dev/github.com/dtapps/go-library)
|
||||
|
||||
[comment]: <> (goproxy.cn)
|
||||
[![goproxy](https://goproxy.cn/stats/github.com/dtapps/go-library/badges/download-count.svg)](https://goproxy.cn/stats/github.com/dtapps/go-library)
|
||||
|
||||
[comment]: <> (goreportcard.com)
|
||||
[![go report card](https://goreportcard.com/badge/github.com/dtapps/go-library)](https://goreportcard.com/report/github.com/dtapps/go-library)
|
||||
|
||||
[comment]: <> (github.com)
|
||||
[![watchers](https://badgen.net/github/watchers/dtapps/go-library)](https://github.com/dtapps/go-library/watchers)
|
||||
[![stars](https://badgen.net/github/stars/dtapps/go-library)](https://github.com/dtapps/go-library/stargazers)
|
||||
[![forks](https://badgen.net/github/forks/dtapps/go-library)](https://github.com/dtapps/go-library/network/members)
|
||||
[![issues](https://badgen.net/github/issues/dtapps/go-library)](https://github.com/dtapps/go-library/issues)
|
||||
[![branches](https://badgen.net/github/branches/dtapps/go-library)](https://github.com/dtapps/go-library/branches)
|
||||
[![releases](https://badgen.net/github/releases/dtapps/go-library)](https://github.com/dtapps/go-library/releases)
|
||||
[![tags](https://badgen.net/github/tags/dtapps/go-library)](https://github.com/dtapps/go-library/tags)
|
||||
[![license](https://badgen.net/github/license/dtapps/go-library)](https://github.com/dtapps/go-library/blob/master/LICENSE)
|
||||
[![contributors](https://badgen.net/github/contributors/dtapps/go-library)](https://github.com/dtapps/go-library/CONTRIBUTING.md)
|
||||
[![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/dtapps/go-library)](https://github.com/dtapps/go-library)
|
||||
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/dtapps/go-library)](https://github.com/dtapps/go-library/releases)
|
||||
[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/dtapps/go-library)](https://github.com/dtapps/go-library/tags)
|
||||
[![GitHub pull requests](https://img.shields.io/github/issues-pr/dtapps/go-library)](https://github.com/dtapps/go-library/pulls)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/dtapps/go-library)](https://github.com/dtapps/go-library/issues)
|
||||
[![GitHub Sponsors](https://img.shields.io/github/sponsors/dtapps)](https://github.com/dtapps/go-library/FUNDING.yml)
|
||||
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/dtapps/go-library)](https://github.com/dtapps/go-library)
|
||||
[![GitHub language count](https://img.shields.io/github/languages/count/dtapps/go-library)](https://github.com/dtapps/go-library)
|
||||
[![GitHub search hit counter](https://img.shields.io/github/search/dtapps/go-library/go)](https://github.com/dtapps/go-library)
|
||||
[![GitHub top language](https://img.shields.io/github/languages/top/dtapps/go-library)](https://github.com/dtapps/go-library)
|
||||
|
||||
[comment]: <> (scrutinizer-ci.com)
|
||||
[![Scrutinizer build (GitHub/Bitbucket)](https://img.shields.io/scrutinizer/build/g/dtapps/go-library/master)](https://scrutinizer-ci.com/g/dtapps/go-library)
|
||||
[![Scrutinizer coverage (GitHub/BitBucket)](https://img.shields.io/scrutinizer/coverage/g/dtapps/go-library/master)](https://scrutinizer-ci.com/g/dtapps/go-library)
|
||||
[![Scrutinizer code quality (GitHub/Bitbucket)](https://img.shields.io/scrutinizer/quality/g/dtapps/go-library/master)](https://scrutinizer-ci.com/g/dtapps/go-library)
|
||||
|
||||
[comment]: <> (www.travis-ci.com)
|
||||
[![Travis (.com) branch](https://img.shields.io/travis/com/dtapps/go-library/master)](https://www.travis-ci.com/github/dtapps/go-library)
|
||||
|
||||
[comment]: <> (app.codecov.io)
|
||||
[![Codecov branch](https://img.shields.io/codecov/c/github/dtapps/go-library/master)](https://app.codecov.io/gh/dtapps/go-library)
|
||||
|
||||
[comment]: <> (gitlab.com)
|
||||
[![gitlab (.com)](https://gitlab.com/dtapps/go-library/badges/master/pipeline.svg)](https://gitlab.com/dtapps/go-library)
|
||||
|
||||
[comment]: <> (codechina.csdn.net)
|
||||
[![codechina.csdn (.net)](https://codechina.csdn.net/dtapps/go-library/badges/master/pipeline.svg)](https://codechina.csdn.net/dtapps/go-library)
|
||||
[![godoc](https://pkg.go.dev/badge/gitee.com/dtapps/go-library?status.svg)](https://pkg.go.dev/gitee.com/dtapps/go-library)
|
||||
[![goproxy.cn](https://goproxy.cn/stats/gitee.com/dtapps/go-library/badges/download-count.svg)](https://goproxy.cn/stats/gitee.com/dtapps/go-library)
|
||||
[![goreportcard.com](https://goreportcard.com/badge/gitee.com/dtapps/go-library)](https://goreportcard.com/report/gitee.com/dtapps/go-library)
|
||||
[![deps.dev](https://img.shields.io/badge/deps-go-red.svg)](https://deps.dev/go/gitee.com%2Fdtapps%2Fgo-library)
|
||||
|
||||
## Install
|
||||
|
||||
```Importing
|
||||
go get github.com/dtapps/go-library
|
||||
go get gitee.com/dtapps/go-library
|
||||
```
|
||||
|
@ -1,19 +0,0 @@
|
||||
- name: GoLang Test
|
||||
# You may pin to the exact commit or the version.
|
||||
# uses: n8maninger/action-golang-test@a8263fc1a85b63937b1b365946518675ceab5740
|
||||
uses: n8maninger/action-golang-test@v1
|
||||
with:
|
||||
# the package to run the tests for
|
||||
package: # optional, default is ./...
|
||||
# additional go test command line arguments, individual arguments should be separated by ';'
|
||||
args: # optional, default is
|
||||
# outputs a warning for long running tests, -1 to disable
|
||||
show-long-running-tests: # optional, default is 30
|
||||
# includes package output in the parsed output
|
||||
show-package-output: # optional
|
||||
# shows tests that were run and passed
|
||||
show-passed-tests: # optional
|
||||
# shows the unparsed std-out from go test instead of the parsed output
|
||||
show-stdout: # optional
|
||||
# skips installing and setting up Go, useful for defining additional parameters for actions/setup-go
|
||||
skip-go-install: # optional
|
@ -0,0 +1,5 @@
|
||||
package library
|
||||
|
||||
func Version() string {
|
||||
return "1.0.18"
|
||||
}
|
Loading…
Reference in new issue