Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bruce Flynn
sftper
Commits
139874fe
Commit
139874fe
authored
Sep 19, 2019
by
Bruce Flynn
Browse files
fix whitespace
parent
4d9f9b33
Changes
2
Hide whitespace changes
Inline
Side-by-side
build.sh
View file @
139874fe
...
...
@@ -4,4 +4,4 @@ ver=$(git describe)
sha
=
$(
git rev-parse HEAD
)
dt
=
"
$(
date
+%Y-%m-%d
)
T
$(
date
+%H:%M:%S
)
Z"
buildStr
=
"v
${
ver
}
(
${
dt
}
)"
go
install
-ldflags
"-X 'main.buildStr=
${
buildStr
}
'"
go
build
-ldflags
"-X 'main.buildStr=
${
buildStr
}
'"
main.go
View file @
139874fe
...
...
@@ -39,6 +39,7 @@ func main() {
pflag
.
Usage
=
func
()
{
fmt
.
Fprintf
(
os
.
Stderr
,
`%s [options]
A mini JSON API for performing SFTP commands.
Supported commands read from commands:
...
...
@@ -47,13 +48,13 @@ Supported commands read from commands:
{"command": "GET", "args": {"source": <path>, "dest": <path>}}
{"command": "LISTDIR", "args": {"path": <path>}}
returns [{"name": "<filename>", "size": <bytes>, "mtime": <unixtime>}, ...]
{"command": "DELETE", "args": {"path": <path>}}
{"command": "DELETE", "args": {"path": <path>}}
Responses written to stdout:
{"status": "(ok|error|fail)", "message": "<err message>", "data": (""|??)}
where "data" is documented with the command.
where "data" is documented with the command.
Options:
...
...
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