Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloured-glaze committed Dec 3, 2022
1 parent 4e81207 commit bc79b9a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions bdfy/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,39 @@ func Tr(Q string) (*Trans, error) {
}
return t, nil
}

/*
package main
import (
"fmt"
"github.com/Coloured-glaze/toolbox/bdfy"
)
var (
// 改成您的APP ID
AppId string = ""
// 改成您的密钥
SecretKey string = ""
)
func init() {
bdfy.AppId, _ = AppId
bdfy.SecretKey, _ = SecretKey
}
func main() {
str := "about"
tr, err := bdfy.Tr(str)
if err != nil {
panic(err)
}
fmt.Println(tr.Tresult[0].Dst)
}
output :
关于
*/

0 comments on commit bc79b9a

Please sign in to comment.