Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eiixy committed Dec 15, 2023
1 parent a45225d commit 4471854
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
# Translate
# Translate

## Usage

### Install

```shell
go get github.com/eiixy/go-translate
```

### Example
```go
package main

import (
"fmt"
"github.com/eiixy/go-translate"
)

func main() {
tr := translate.NewClient()
texts, err := tr.Translates([]string{"hello", "world"})
if err != nil {
fmt.Println(err)
return
}
fmt.Println(texts)

text, err := tr.Translate("hello world")
if err != nil {
fmt.Println(err)
return
}
fmt.Println(text)
}

```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/eiixy/go-translate

go 1.20
go 1.18

require golang.org/x/time v0.5.0

0 comments on commit 4471854

Please sign in to comment.