feat: NewClient 添加了对 *http.Client 的自定义 #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cache | |
on: [push, pull_request] | |
jobs: | |
cache: | |
name: Cache | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
go: ['1.20.x', '1.21.x'] | |
services: | |
memcached: | |
image: memcached:latest | |
ports: | |
- 11211:11211 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
id: go | |
- name: Vet | |
run: | | |
cd cache/caches | |
go vet -v ./... | |
- name: Test | |
env: | |
LANG: en | |
run: | | |
cd cache/caches | |
go test -v ./... |