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
20bf000e
Commit
20bf000e
authored
Aug 10, 2023
by
Michael Yang
Browse files
no warning on comments
parent
be889b2f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
parser/parser.go
parser/parser.go
+4
-2
No files found.
parser/parser.go
View file @
20bf000e
...
@@ -48,8 +48,10 @@ func Parse(reader io.Reader) ([]Command, error) {
...
@@ -48,8 +48,10 @@ func Parse(reader io.Reader) ([]Command, error) {
command
.
Name
=
string
(
fields
[
0
])
command
.
Name
=
string
(
fields
[
0
])
command
.
Args
=
string
(
fields
[
1
])
command
.
Args
=
string
(
fields
[
1
])
default
:
default
:
if
!
bytes
.
HasPrefix
(
fields
[
0
],
[]
byte
(
"#"
))
{
// log a warning for unknown commands
// log a warning for unknown commands
log
.
Printf
(
"WARNING: Unknown command: %s"
,
fields
[
0
])
log
.
Printf
(
"WARNING: Unknown command: %s"
,
fields
[
0
])
}
continue
continue
}
}
...
...
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