Quotes, URL, Bugfixes, Docs Changes#6
Quotes, URL, Bugfixes, Docs Changes#6dsoprea wants to merge 5 commits intogo-acd:masterfrom dsoprea:quotes-url-bugfixes-docs
Conversation
- Added support for providing an alternate token server.
kalbasit
left a comment
There was a problem hiding this comment.
apologies it took me so long to get to the PR, not sure why it did not show up on my notifications.
| ``` | ||
| go get gopkg.in/acd.v0/... | ||
| $ go get gopkg.in/acd.v0/cmd/acd | ||
| $ go build gopkg.in/acd.v0/cmd/acd |
There was a problem hiding this comment.
why go get and go build? go get should get it installed.
There was a problem hiding this comment.
It doesn't. Create an empty GOPATH directory and try it.
There was a problem hiding this comment.
Seems to work fine for me, perhaps a problem with your environment?
% docker run -it --rm golang /bin/bash
root@7f8906688630:/go# go get gopkg.in/acd.v0/cmd/acd
root@7f8906688630:/go# which acd
/go/bin/acd
root@7f8906688630:/go# acd ls
error creating a new ACD client: no such file or directory
NAME:
acd - A new cli application
USAGE:
acd [global options] command [command options] [arguments...]
VERSION:
0.1.0
AUTHOR:
Wael Nasreddine <wael.nasreddine@gmail.com>
COMMANDS:
cp copy files
ls list directory contents
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--config-file value, -c value the path of the configuration file (default: "/root/.config/acd.json")
--log-level value, -l value possible log levels: 0:DisableLogLevel, 1:FatalLevel, 2:ErrorLevel, 3:InfoLevel, 4:DebugLevel (default: 1)
--help, -h show help
--version, -v print the version
error creating a new ACD client: no such file or directory
There was a problem hiding this comment.
Nope.
Also note that, in the output you gave above, you do a get but then magically already have a binary without building.
There was a problem hiding this comment.
@dsoprea that's how go get works, it fetches the library and then the dependencies and then installs it.
# go get -h
usage: get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]
Get downloads the packages named by the import paths, along with their
dependencies. It then installs the named packages, like 'go install'.
There was a problem hiding this comment.
@dsoprea do you want to make this change so I can merge? I'll also take a look at the CI, I believe it's failing because the secrets do not exist.
| Run: | ||
|
|
||
| ``` | ||
| $ $GOPATH/bin/acd ls acd:// |
There was a problem hiding this comment.
please add $GOPATH/bin to your PATH instead of referencing it.
There was a problem hiding this comment.
It's just an example. It has to make absolute sense to the person reading the README without us making any assumptions about their path.
|
Hmm. Confirmed. I had missed that in the beginning.
Dustin
…On Sat, Mar 4, 2017 at 1:25 AM, Wael Nasreddine ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md <#6 (comment)>:
>
```
-go get gopkg.in/acd.v0/...
+$ go get gopkg.in/acd.v0/cmd/acd
+$ go build gopkg.in/acd.v0/cmd/acd
@dsoprea <https://github.com/dsoprea> that's how go get works, it fetches
the library and then the dependencies and then installs it.
# go get -h
usage: get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]
Get downloads the packages named by the import paths, along with their
dependencies. It then installs the named packages, like 'go install'.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AArramMQdYQseDaPmkGAhD58ZR7lVeJgks5riQPogaJpZM4L-acl>
.
|
|
@dsoprea thinking about this, we need to split this into multiple PRs. See https://github.com/go-acd/acd#commit-style-guideline |
Added documentation about the configuration file format. This was needed in order to know how to even run
acd. Expanded "get" instruction to also describe build and run. I also added an example execution ofacd ls. Since this requires a special "acd://<...>" URI to be given, it wasn't intuitive how to do this without the help.Added the ability to provide the token-server URL via the config (and removed your to-do comment regarding the same).
Added quotes to short-listing (otherwise it's very confusing when filenames include spaces). This will slash any existing quotes in the names.
When I deleted something via the Amazon UI and attempted to list via
acd, it started crashing. I had to add a check for whetherc.NodeTreewas non-nil before callingClose()on it fromClient'sClose(). I was still getting an index/range error, so I also needed to update the prune routine to do the (len- 1) things only if there are other nodes.closes #8