Skip to content

Commit

Permalink
chore: adapt to exaring
Browse files Browse the repository at this point in the history
  • Loading branch information
costela committed Nov 3, 2023
1 parent 55fc8cf commit a3c169c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 124 deletions.
19 changes: 0 additions & 19 deletions .golangci.yml

This file was deleted.

76 changes: 0 additions & 76 deletions CODE_OF_CONDUCT.md

This file was deleted.

28 changes: 3 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
This repository holds the [Uber Go Style Guide](style.md), which documents
patterns and conventions used in Go code at Uber.
This repository holds the [Exaring Go Style Guide](style.md), which documents
patterns and conventions used in Go code at Exaring.

## Style Guide

See [Uber Go Style Guide](style.md) for the style guide.

## Translations

We are aware of the following translations of this guide by the Go community.

- **中文翻译** (Chinese): [xxjwxc/uber_go_guide_cn](https://github.com/xxjwxc/uber_go_guide_cn)
- **繁體中文** (Traditional Chinese):[ianchen0119/uber_go_guide_tw](https://github.com/ianchen0119/uber_go_guide_tw)
- **한국어 번역** (Korean): [TangoEnSkai/uber-go-style-guide-kr](https://github.com/TangoEnSkai/uber-go-style-guide-kr)
- **日本語訳** (Japanese): [knsh14/uber-style-guide-ja](https://github.com/knsh14/uber-style-guide-ja)
- **Traducción al Español** (Spanish): [friendsofgo/uber-go-guide-es](https://github.com/friendsofgo/uber-go-guide-es)
- **แปลภาษาไทย** (Thai): [pallat/uber-go-style-guide-th](https://github.com/pallat/uber-go-style-guide-th)
- **Tradução em português** (Portuguese): [lucassscaravelli/uber-go-guide-pt](https://github.com/lucassscaravelli/uber-go-guide-pt)
- **Tłumaczenie polskie** (Polish): [DamianSkrzypczak/uber-go-guide-pl](https://github.com/DamianSkrzypczak/uber-go-guide-pl)
- **Русский перевод** (Russian): [sau00/uber-go-guide-ru](https://github.com/sau00/uber-go-guide-ru)
- **Français** (French): [rm3l/uber-go-style-guide-fr](https://github.com/rm3l/uber-go-style-guide-fr)
- **Türkçe** (Turkish): [ksckaan1/uber-go-style-guide-tr](https://github.com/ksckaan1/uber-go-style-guide-tr)
- **Український переклад** (Ukrainian): [vorobeyme/uber-go-style-guide-uk](https://github.com/vorobeyme/uber-go-style-guide-uk)
- **ترجمه فارسی** (Persian): [jamalkaksouri/uber-go-guide-ir](https://github.com/jamalkaksouri/uber-go-guide-ir)

If you have a translation, feel free to submit a PR adding it to the list.
It is based on the [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md).
10 changes: 8 additions & 2 deletions src/import-group.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Import Group Ordering

There should be two import groups:
There should be three import groups:

- Standard library
- Everything else
- Local package

This is the grouping applied by goimports by default.
This grouping can be applied by `goimports` with the `-local` flag.

Any [gopls](https://github.com/golang/tools/blob/master/gopls/doc/settings.md#local-string)-based IDE and [goland](https://www.jetbrains.com/help/idea/code-style-go.html#imports) can be configured to support this.

<table>
<thead><tr><th>Bad</th><th>Good</th></tr></thead>
Expand All @@ -18,6 +21,7 @@ import (
"os"
"go.uber.org/atomic"
"golang.org/x/sync/errgroup"
"source.example.com/yourname/yourproject"
)
```

Expand All @@ -30,6 +34,8 @@ import (

"go.uber.org/atomic"
"golang.org/x/sync/errgroup"

"source.example.com/yourname/yourproject"
)
```

Expand Down
10 changes: 8 additions & 2 deletions style.md
Original file line number Diff line number Diff line change
Expand Up @@ -2566,12 +2566,15 @@ func (c *client) request() {

### Import Group Ordering

There should be two import groups:
There should be three import groups:

- Standard library
- Everything else
- Local package

This is the grouping applied by goimports by default.
This grouping can be applied by `goimports` with the `-local` flag.

Any [gopls](https://github.com/golang/tools/blob/master/gopls/doc/settings.md#local-string)-based IDE and [goland](https://www.jetbrains.com/help/idea/code-style-go.html#imports) can be configured to support this.

<table>
<thead><tr><th>Bad</th><th>Good</th></tr></thead>
Expand All @@ -2584,6 +2587,7 @@ import (
"os"
"go.uber.org/atomic"
"golang.org/x/sync/errgroup"
"source.example.com/yourname/yourproject"
)
```

Expand All @@ -2596,6 +2600,8 @@ import (

"go.uber.org/atomic"
"golang.org/x/sync/errgroup"

"source.example.com/yourname/yourproject"
)
```

Expand Down

0 comments on commit a3c169c

Please sign in to comment.