Skip to content

Quotes, URL, Bugfixes, Docs Changes#6

Open
dsoprea wants to merge 5 commits intogo-acd:masterfrom
dsoprea:quotes-url-bugfixes-docs
Open

Quotes, URL, Bugfixes, Docs Changes#6
dsoprea wants to merge 5 commits intogo-acd:masterfrom
dsoprea:quotes-url-bugfixes-docs

Conversation

@dsoprea
Copy link

@dsoprea dsoprea commented Feb 12, 2017

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 of acd 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 whether c.NodeTree was non-nil before calling Close() on it from Client's Close(). 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

@dsoprea dsoprea changed the title Quotes url bugfixes docs Quotes, URL, Bugfixes, Docs Changes Feb 12, 2017
Copy link
Contributor

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why go get and go build? go get should get it installed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't. Create an empty GOPATH directory and try it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Author

@dsoprea dsoprea Mar 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope.

Also note that, in the output you gave above, you do a get but then magically already have a binary without building.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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://
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add $GOPATH/bin to your PATH instead of referencing it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@kalbasit kalbasit Mar 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.

@dsoprea
Copy link
Author

dsoprea commented Mar 4, 2017 via email

@kalbasit
Copy link
Contributor

@dsoprea thinking about this, we need to split this into multiple PRs. See https://github.com/go-acd/acd#commit-style-guideline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can you provide an example of the configuration .json we need to have?

2 participants