Skip to content

Commit 042a28b

Browse files
prepare 1.0.0 release (#1)
1 parent d24c84b commit 042a28b

23 files changed

+2313
-0
lines changed

.circleci/config.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
version: 2.1
2+
3+
orbs:
4+
win: circleci/[email protected]
5+
6+
workflows:
7+
workflow:
8+
jobs:
9+
- go-test:
10+
name: Go 1.13
11+
docker-image: circleci/golang:1.13
12+
- go-test:
13+
name: Go 1.12
14+
docker-image: circleci/golang:1.12
15+
- go-test:
16+
name: Go 1.11
17+
docker-image: circleci/golang:1.11
18+
run-lint: true # we only need to run lint once, and it doesn't work for 1.12+
19+
- go-test:
20+
name: Go 1.10
21+
docker-image: circleci/golang:1.10
22+
- go-test:
23+
name: Go 1.9
24+
docker-image: circleci/golang:1.9
25+
- go-test:
26+
name: Go 1.8
27+
docker-image: circleci/golang:1.8
28+
- go-test-windows:
29+
name: Windows
30+
31+
jobs:
32+
go-test:
33+
parameters:
34+
run-lint:
35+
type: boolean
36+
default: false
37+
docker-image:
38+
type: string
39+
40+
docker:
41+
- image: <<parameters.docker-image>>
42+
environment:
43+
CIRCLE_TEST_REPORTS: /tmp/circle-reports
44+
CIRCLE_ARTIFACTS: /tmp/circle-artifacts
45+
COMMON_GO_PACKAGES: >
46+
github.com/golang/dep/cmd/dep
47+
github.com/jstemmer/go-junit-report
48+
49+
working_directory: /go/src/gopkg.in/launchdarkly/go-sdk-common.v1
50+
51+
steps:
52+
- checkout
53+
- run: go get -u $COMMON_GO_PACKAGES
54+
- when:
55+
condition: <<parameters.run-lint>>
56+
steps:
57+
- run: make lint
58+
- run: go get -t ./...
59+
- run: go build ./...
60+
61+
- run:
62+
name: Run tests
63+
command: |
64+
mkdir -p $CIRCLE_TEST_REPORTS
65+
mkdir -p $CIRCLE_ARTIFACTS
66+
trap "go-junit-report < $CIRCLE_ARTIFACTS/report.txt > $CIRCLE_TEST_REPORTS/junit.xml" EXIT
67+
make test | tee $CIRCLE_ARTIFACTS/report.txt
68+
69+
- store_test_results:
70+
path: /tmp/circle-reports
71+
72+
- store_artifacts:
73+
path: /tmp/circle-artifacts
74+
75+
go-test-windows:
76+
executor:
77+
name: win/vs2019
78+
shell: powershell.exe
79+
80+
environment:
81+
GOPATH: C:\Users\VssAdministrator\go
82+
PACKAGE_PATH: gopkg.in\launchdarkly\go-sdk-common.v1
83+
84+
steps:
85+
- checkout
86+
- run: go version
87+
- run:
88+
name: move source
89+
command: |
90+
go env GOPATH
91+
mkdir ${env:GOPATH}\src\${env:PACKAGE_PATH}
92+
mv * ${env:GOPATH}\src\${env:PACKAGE_PATH}\
93+
- run:
94+
name: build and test
95+
command: |
96+
cd ${env:GOPATH}\src\${env:PACKAGE_PATH}
97+
go get -t ./...
98+
go test -race ./...
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is this a support request?**
11+
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing [email protected].
12+
13+
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.
14+
15+
**Describe the bug**
16+
A clear and concise description of what the bug is.
17+
18+
**To reproduce**
19+
Steps to reproduce the behavior.
20+
21+
**Expected behavior**
22+
A clear and concise description of what you expected to happen.
23+
24+
**Logs**
25+
If applicable, add any log output related to your problem.
26+
27+
**SDK version**
28+
The version of this SDK that you are using.
29+
30+
**Language version, developer tools**
31+
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.
32+
33+
**OS/platform**
34+
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.
35+
36+
**Additional context**
37+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context about the feature request here.

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
**Requirements**
2+
3+
- [ ] I have added test coverage for new or changed functionality
4+
- [ ] I have followed the repository's [pull request submission guidelines](../blob/master/CONTRIBUTING.md#submitting-pull-requests)
5+
- [ ] I have validated my changes against all supported platform versions
6+
7+
**Related issues**
8+
9+
Provide links to any issues in this repository or elsewhere relating to this pull request.
10+
11+
**Describe the solution you've provided**
12+
13+
Provide a clear and concise description of what you expect to happen.
14+
15+
**Describe alternatives you've considered**
16+
17+
Provide a clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
21+
Add any other context about the pull request here.

.golangci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
run:
2+
deadline: 120s
3+
tests: false
4+
5+
linters:
6+
enable-all: true
7+
disable:
8+
- goconst
9+
fast: false
10+
11+
linter-settings:
12+
gofmt:
13+
simplify: false
14+
15+
issues:
16+
exclude-use-default: false
17+
max-same-issues: 1000
18+
max-per-linter: 1000

.ldrelease/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ repo:
44

55
releasableBranches:
66
- name: v1
7+
description: 1.x - for Go SDK 4.x
78

89
publications:
910
- url: https://godoc.org/gopkg.in/launchdarkly/go-sdk-common.v1

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Change log
2+
3+
All notable changes to the project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributing to this project
2+
3+
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this project.
4+
5+
## Submitting bug reports and feature requests
6+
7+
The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/go-sdk-common/issues) in tis repository. Bug reports and feature requests specific to this project should be filed in this issue tracker. The SDK team will respond to all newly filed issues within two business days. For issues or requests that are more generally related to the LaunchDarkly Go SDK, rather than specifically for the code in this repository, please use the [`go-server-sdk`](https://github.com/launchdarkly/go-server-sdk) repository.
8+
9+
## Submitting pull requests
10+
11+
We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.
12+
13+
## Build instructions
14+
15+
### Prerequisites
16+
17+
This project should be built against Go 1.8 or newer.
18+
19+
Note that the public import path is `gopkg.in/launchdarkly/go-sdk-common.v1` (using the [`gopkg.in`](https://labix.org/gopkg.in) service as a simple way to pin to a major version). Since it does not use Go modules, and it references its own import path in imports between packages, this means that in order to build it you must check it out at `$GOPATH/src/gopkg.in/launchdarkly/go-sdk-common.v1`-- not `$GOPATH/src/github.com/launchdarkly/go-sdk-common`.
20+
21+
### Building
22+
23+
To build the project without running any tests:
24+
```
25+
make
26+
```
27+
28+
If you wish to clean your working directory between builds, you can clean it by running:
29+
```
30+
make clean
31+
```
32+
33+
To run the linter:
34+
```
35+
make lint
36+
```
37+
38+
### Testing
39+
40+
To build and run all unit tests:
41+
```
42+
make test
43+
```

LICENSE.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2020 Catamorphic, Co.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
GOLANGCI_LINT_VERSION=v1.10.2
3+
4+
LINTER=./bin/golangci-lint
5+
6+
.PHONY: build clean test lint
7+
8+
build:
9+
go get ./...
10+
go build ./...
11+
12+
clean:
13+
go clean
14+
15+
test:
16+
@# Note, we need to specify all these packages individually for go test in order to remain 1.8-compatible
17+
go test -race -v ./ldvalue
18+
19+
$(LINTER):
20+
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s $(GOLANGCI_LINT_VERSION)
21+
22+
lint: $(LINTER)
23+
$(LINTER) run ./...

0 commit comments

Comments
 (0)