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
6297f856
Commit
6297f856
authored
Jun 04, 2024
by
Michael Yang
Browse files
gofmt, goimports
parent
ed56428d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
8 deletions
+9
-8
.github/workflows/test.yaml
.github/workflows/test.yaml
+2
-2
.golangci.yaml
.golangci.yaml
+3
-2
llm/memory.go
llm/memory.go
+1
-1
server/images.go
server/images.go
+1
-1
types/model/name_test.go
types/model/name_test.go
+2
-2
No files found.
.github/workflows/test.yaml
View file @
6297f856
...
@@ -269,9 +269,9 @@ jobs:
...
@@ -269,9 +269,9 @@ jobs:
mkdir -p llm/build/darwin/$ARCH/stub/bin
mkdir -p llm/build/darwin/$ARCH/stub/bin
touch llm/build/darwin/$ARCH/stub/bin/ollama_llama_server
touch llm/build/darwin/$ARCH/stub/bin/ollama_llama_server
if
:
${{ startsWith(matrix.os, 'macos-') }}
if
:
${{ startsWith(matrix.os, 'macos-') }}
-
uses
:
golangci/golangci-lint-action@v
4
-
uses
:
golangci/golangci-lint-action@v
6
with
:
with
:
args
:
--timeout 8m0s -v
args
:
--timeout 8m0s -v
${{ startsWith(matrix.os, 'windows-') && '' || '--disable gofmt --disable goimports' }}
test
:
test
:
strategy
:
strategy
:
matrix
:
matrix
:
...
...
.golangci.yaml
View file @
6297f856
...
@@ -9,8 +9,9 @@ linters:
...
@@ -9,8 +9,9 @@ linters:
-
contextcheck
-
contextcheck
-
exportloopref
-
exportloopref
-
gocheckcompilerdirectives
-
gocheckcompilerdirectives
-
gofmt
# conditionally enable this on linux/macos
-
goimports
# - gofmt
# - goimports
-
intrange
-
intrange
-
misspell
-
misspell
-
nilerr
-
nilerr
...
...
llm/memory.go
View file @
6297f856
...
@@ -5,9 +5,9 @@ import (
...
@@ -5,9 +5,9 @@ import (
"log/slog"
"log/slog"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/gpu"
"github.com/ollama/ollama/gpu"
"github.com/ollama/ollama/envconfig"
)
)
// This algorithm looks for a complete fit to determine if we need to unload other models
// This algorithm looks for a complete fit to determine if we need to unload other models
...
...
server/images.go
View file @
6297f856
...
@@ -24,10 +24,10 @@ import (
...
@@ -24,10 +24,10 @@ import (
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/auth"
"github.com/ollama/ollama/auth"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/llm"
"github.com/ollama/ollama/llm"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/types/errtypes"
"github.com/ollama/ollama/types/errtypes"
"github.com/ollama/ollama/types/model"
"github.com/ollama/ollama/types/model"
"github.com/ollama/ollama/version"
"github.com/ollama/ollama/version"
...
...
types/model/name_test.go
View file @
6297f856
...
@@ -386,8 +386,8 @@ func FuzzName(f *testing.F) {
...
@@ -386,8 +386,8 @@ func FuzzName(f *testing.F) {
func
TestIsValidNamespace
(
t
*
testing
.
T
)
{
func
TestIsValidNamespace
(
t
*
testing
.
T
)
{
cases
:=
[]
struct
{
cases
:=
[]
struct
{
username
string
username
string
expected
bool
expected
bool
}{
}{
{
""
,
false
},
{
""
,
false
},
{
"a"
,
true
},
{
"a"
,
true
},
...
...
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