Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename longbridgeapp to longbridge. #11

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
name: Test
on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.18
id: go

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Get dependencies
run: |
go get -v -t -d ./...

- name: Test
run: go test
- name: Test
run: go test
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
https://github.com/longbridgeapp/autocorrect/releases
https://github.com/longbridge/autocorrect/releases

## 1.0.0

Expand All @@ -12,7 +12,7 @@ func (my myFormatter) Format(text string) string {
return strings.ReplaceAll(text, "ios", "iOS")
}

autocorrect.Format("新版本ios即将发布", myFormatter{})
autocorrect.Format("新版本 ios 即将发布", myFormatter{})
// "新版本 iOS 即将发布"
```

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AutoCorrrect for Go

[![Go](https://github.com/longbridgeapp/autocorrect/workflows/Go/badge.svg)](https://github.com/longbridgeapp/autocorrect/actions?query=workflow%3AGo)
[![Go](https://github.com/longbridge/autocorrect/workflows/Go/badge.svg)](https://github.com/longbridge/autocorrect/actions?query=workflow%3AGo)

Automatically add whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).

Expand All @@ -25,7 +25,7 @@ Go 版本的 [AutoCorrect](https://github.com/huacnlee/autocorrect) 实现,用
## Usage

```
go get github.com/longbridgeapp/autocorrect
go get github.com/longbridge/autocorrect
```

Use `autocorrect.Format` to format plain text.
Expand All @@ -35,7 +35,7 @@ https://play.golang.org/p/ntVhrGYnxNk
```go
package main

import "github.com/longbridgeapp/autocorrect"
import "github.com/longbridge/autocorrect"

func main() {
autocorrect.Format("长桥LongBridge App下载")
Expand Down Expand Up @@ -83,7 +83,7 @@ Use `autocorrect.Unformat` to cleanup spacings in plain text.
```go
package main

import "github.com/longbridgeapp/autocorrect"
import "github.com/longbridge/autocorrect"

func main() {
autocorrect.Unformat("据港交所最新权益披露资料显示,2019 年 12 月 27 日,三生制药获 JP Morgan Chase & Co.每股均价 9.582 港元,增持 270.3 万股,总价约 2590 万港元。")
Expand All @@ -98,7 +98,7 @@ https://go.dev/play/p/qS6NuPcYjSa
```go
package main

import "github.com/longbridgeapp/autocorrect"
import "github.com/longbridge/autocorrect"

func main() {
autocorrect.FormatHTML(htmlBody)
Expand All @@ -113,7 +113,7 @@ func main() {
Run `go test -bench=.` to benchmark.

```
pkg: github.com/longbridgeapp/autocorrect
pkg: github.com/longbridge/autocorrect
BenchmarkFormat50-8 28234 40439 ns/op
BenchmarkFormat100-8 15157 79213 ns/op
BenchmarkFormat400-8 4172 287352 ns/op
Expand Down
2 changes: 1 addition & 1 deletion _fixtures/large.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/longbridgeapp/assert"
"github.com/longbridge/assert"
)

func assertCases(t *testing.T, cases map[string]string) {
Expand Down
2 changes: 1 addition & 1 deletion fullwidth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package autocorrect
import (
"testing"

"github.com/longbridgeapp/assert"
"github.com/longbridge/assert"
)

func Test_fullwidth(t *testing.T) {
Expand Down
17 changes: 12 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
module github.com/longbridgeapp/autocorrect
module github.com/longbridge/autocorrect

go 1.13
go 1.18

require (
github.com/longbridgeapp/assert v0.1.0
github.com/pkg/errors v0.8.1
github.com/tdewolff/parse/v2 v2.6.5
github.com/longbridge/assert v1.2.0
github.com/pkg/errors v0.9.1
github.com/tdewolff/parse/v2 v2.7.19
)

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/longbridgeapp/assert v0.1.0 h1:KkQlHUJSpuUFkUDjwBJgghFl31+wwSDHTq/WRrvLjko=
github.com/longbridgeapp/assert v0.1.0/go.mod h1:ew3umReliXtk1bBG4weVURxdvR0tsN+rCEfjnA4YfxI=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/longbridge/assert v1.2.0 h1:B6rA/jKqUCxWJm5ynZ7+GdU/QOO7oQ6kRDiFxZpGFfA=
github.com/longbridge/assert v1.2.0/go.mod h1:f+m/dapL9whm3fIgLZe0vU3Nf8z4SZieivo9n2oKUW8=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tdewolff/parse/v2 v2.6.5 h1:lYvWBk55GkqKl0JJenGpmrgu/cPHQQ6/Mm1hBGswoGQ=
github.com/tdewolff/parse/v2 v2.6.5/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs=
github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM=
github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/parse/v2 v2.7.19 h1:7Ljh26yj+gdLFEq/7q9LT4SYyKtwQX4ocNrj45UCePg=
github.com/tdewolff/parse/v2 v2.7.19/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52 h1:gAQliwn+zJrkjAHVcBEYW/RFvd2St4yYimisvozAYlA=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
2 changes: 1 addition & 1 deletion halfwidth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package autocorrect
import (
"testing"

"github.com/longbridgeapp/assert"
"github.com/longbridge/assert"
)

func Test_halfwidth(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion html_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io/ioutil"
"testing"

"github.com/longbridgeapp/assert"
"github.com/longbridge/assert"
)

func readFile(filename string) (out string) {
Expand Down
2 changes: 1 addition & 1 deletion unformat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/longbridgeapp/assert"
"github.com/longbridge/assert"
)

func TestUnformat(t *testing.T) {
Expand Down
Loading