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
12e046f1
Commit
12e046f1
authored
Nov 18, 2023
by
Jeffrey Morgan
Browse files
remove unused function
parent
36a3bbf6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
20 deletions
+0
-20
server/images.go
server/images.go
+0
-20
No files found.
server/images.go
View file @
12e046f1
...
...
@@ -228,26 +228,6 @@ func GetModel(name string) (*Model, error) {
return
model
,
nil
}
func
filenameWithPath
(
path
,
f
string
)
(
string
,
error
)
{
// if filePath starts with ~/, replace it with the user's home directory.
if
strings
.
HasPrefix
(
f
,
fmt
.
Sprintf
(
"~%s"
,
string
(
os
.
PathSeparator
)))
{
parts
:=
strings
.
Split
(
f
,
string
(
os
.
PathSeparator
))
home
,
err
:=
os
.
UserHomeDir
()
if
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"failed to open file: %v"
,
err
)
}
f
=
filepath
.
Join
(
home
,
filepath
.
Join
(
parts
[
1
:
]
...
))
}
// if filePath is not an absolute path, make it relative to the modelfile path
if
!
filepath
.
IsAbs
(
f
)
{
f
=
filepath
.
Join
(
filepath
.
Dir
(
path
),
f
)
}
return
f
,
nil
}
func
realpath
(
p
string
)
string
{
abspath
,
err
:=
filepath
.
Abs
(
p
)
if
err
!=
nil
{
...
...
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