You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-26Lines changed: 20 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,11 @@ Aspose.OCR Cloud SDK for Go is open source under the MIT license. You can freely
17
17
18
18
## System requirements
19
19
20
+
- Go 1.18 or later.
20
21
- Internet connection.
21
22
- Access to the **api.aspose.cloud** domain.
22
-
- Go version 1.18
23
-
- The actual dependencies are listed in go.mod file
23
+
24
+
Check [go.mod](go.mod) file for the full list of third-party dependencies.
24
25
25
26
## Get started
26
27
@@ -54,39 +55,37 @@ Aspose.OCR Cloud follows industry standards and best practices to keep your data
54
55
55
56
### Running demo
56
57
57
-
1. Clone our repository
58
-
2. Install package
58
+
1. Clone this repository or [download](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-go/archive/refs/heads/master.zip) it as ZIP.
59
+
3. Install **Aspose.OCR Cloud SDK for Go** package:
59
60
```shell
60
61
go get github.com/aspose-ocr-cloud/aspose-ocr-cloud-go
61
62
```
62
-
3. Open [examples\example.go](examples\example.go) file and replace "YOUR_CLIENT_ID" and "YOUR_CLIENT_SECRET" with your credentials
63
+
3. Open [examples/example.go](examples/example.go) file and replace "YOUR_CLIENT_ID" and "YOUR_CLIENT_SECRET" with credentials obtained during **Authorization** phase:
63
64
```go
65
+
funcmain() {
64
66
65
-
funcmain(){
66
-
67
67
clientId:="YOUR_CLIENT_ID"
68
68
clientSecret:="YOUR_CLIENT_SECRET"
69
-
...
70
-
```
71
-
4. Open a new terminal and navigate to the aspose-ocr-cloud-go/example/ directory
72
-
```shell
73
-
cd <path_to_sdk>/aspose-ocr-cloud-go/example/
74
69
```
75
-
5. Run example
70
+
4. Open the terminal and navigate to the _example_ directory of the downloaded repository.
71
+
5. Run the example:
76
72
```shell
77
73
go run .\example.go
78
74
```
79
-
6. Files with test results will appear in the aspose-ocr-cloud-go/results/ folder
75
+
6. Recognition results will be saved to the `results` directory of the downloaded repository.
80
76
81
-
Also, as a demo application, you can use the tests
82
-
1. Clone our repository
83
-
2. Install dependencies
77
+
### Running tests
78
+
79
+
We also provide automated tests for [Testify](https://github.com/stretchr/testify).
80
+
81
+
1. Clone this repository or [download](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-go/archive/refs/heads/master.zip) it as ZIP.
82
+
2. Install dependencies:
84
83
```shell
85
84
go get github.com/stretchr/testify/assert
86
85
go get github.com/stretchr/testify/require
87
86
go get golang.org/x/oauth2
88
87
```
89
-
3. In the file [test/test_config.go](test/test_config.go) enter **Client ID** and **Client Secret**
88
+
3. Open [test/test_config.go](test/test_config.go) file and replace "YOUR_CLIENT_ID" and "YOUR_CLIENT_SECRET" with credentials obtained during **Authorization** phase:
90
89
```go
91
90
package asposeocrcloud
92
91
@@ -95,17 +94,12 @@ var (
95
94
ConfigClientSecret = "YOUR_CLIENT_SECRET"
96
95
)
97
96
```
98
-
4. Open a new terminal and navigate to the aspose-ocr-cloud-go/test/ directory
99
-
```shell
100
-
cd <path_to_sdk>/aspose-ocr-cloud-go/test/
101
-
```
102
-
5. Run the tests with the command
97
+
4. Open the terminal and navigate to the _test_ directory of the downloaded repository.
98
+
5. Run tests:
103
99
```
104
100
go test github.com/aspose-ocr-cloud/aspose-ocr-cloud-go/test
105
101
```
106
-
6. Files with test results will appear in the aspose-ocr-cloud-go/results/ folder
107
-
108
-
[Download demo as ZIP archive](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-go/archive/refs/heads/master.zip)
102
+
6. Test results will be saved to the `results` directory of the downloaded repository.
0 commit comments