mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Fix typos and comments
Co-Authored-By: Michael Schurter <michael.schurter@gmail.com>
This commit is contained in:
@@ -60,7 +60,7 @@ func TestAllocExecCommand_Fails(t *testing.T) {
|
||||
"A command is required",
|
||||
},
|
||||
{
|
||||
"log escaped char",
|
||||
"long escaped char",
|
||||
[]string{"-address=" + url, "-e", "long_escape", "26470238-5CF2-438F-8772-DC67CFB0705C", "/bin/bash"},
|
||||
"a single character",
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@ type Handler func(c byte) bool
|
||||
// If handler returns true, `~.` will be skipped; otherwise, it's propagated.
|
||||
// * `~` and it's the last character in stream, it's propagated
|
||||
//
|
||||
// Appearances of `~` when not followed by a new line is propagated unmodified.
|
||||
// Appearances of `~` when not preceded by a new line are propagated unmodified.
|
||||
func NewReader(r io.Reader, c byte, h Handler) io.Reader {
|
||||
return &reader{
|
||||
impl: r,
|
||||
@@ -88,7 +88,7 @@ START:
|
||||
|
||||
// escape character hasn't been emitted yet
|
||||
if buf[0] == r.escapeChar {
|
||||
// earlier ~ was sallowed already, so leave this as is
|
||||
// earlier ~ was swallowed already, so leave this as is
|
||||
} else if handled := r.handler(buf[0]); handled {
|
||||
// need to drop a single letter
|
||||
copy(buf, buf[1:n])
|
||||
|
||||
Reference in New Issue
Block a user