Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
2ce1793a
Commit
2ce1793a
authored
Oct 19, 2023
by
Michael Yang
Browse files
go fmt
parent
e1c5be24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
examples/golang-simplegenerate/main.go
examples/golang-simplegenerate/main.go
+3
-3
format/time_test.go
format/time_test.go
+1
-1
No files found.
examples/golang-simplegenerate/main.go
View file @
2ce1793a
...
@@ -3,10 +3,10 @@ package main
...
@@ -3,10 +3,10 @@ package main
import
(
import
(
"bytes"
"bytes"
"fmt"
"fmt"
"net/http"
"os"
"io"
"io"
"log"
"log"
"net/http"
"os"
)
)
func
main
()
{
func
main
()
{
...
@@ -16,7 +16,7 @@ func main() {
...
@@ -16,7 +16,7 @@ func main() {
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Print
(
err
.
Error
())
fmt
.
Print
(
err
.
Error
())
os
.
Exit
(
1
)
os
.
Exit
(
1
)
}
}
responseData
,
err
:=
io
.
ReadAll
(
resp
.
Body
)
responseData
,
err
:=
io
.
ReadAll
(
resp
.
Body
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
format/time_test.go
View file @
2ce1793a
...
@@ -29,7 +29,7 @@ func TestHumanTime(t *testing.T) {
...
@@ -29,7 +29,7 @@ func TestHumanTime(t *testing.T) {
})
})
t
.
Run
(
"soon"
,
func
(
t
*
testing
.
T
)
{
t
.
Run
(
"soon"
,
func
(
t
*
testing
.
T
)
{
v
:=
now
.
Add
(
800
*
time
.
Millisecond
)
v
:=
now
.
Add
(
800
*
time
.
Millisecond
)
assertEqual
(
t
,
HumanTime
(
v
,
""
),
"Less than a second from now"
)
assertEqual
(
t
,
HumanTime
(
v
,
""
),
"Less than a second from now"
)
})
})
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment