opened
c0dehard
username_0
#### Mistakes removed, update to match for gsclient 3.0.1:
- special thanks goes to @nvthongswansea 
___
#### new commands:
    gscloud server
    gscloud storage
    gscloud network
#### also new:
    global flag --json -j
example command for pretty json output:
    ./gscloud server -j | jq
Feature render as table or  json
issue
created
bkircher
username_1
Okay, pretty cool. This works already
```
$ ./gscloud server ls --json|jq
[
  [
    {
      "server": {
        "object_uuid": "8bbc3917-a0c0-42c6-b3b7-2087cc33cb91",
        "name": "s1",
        "memory": 1,
        "cores": 1,
        "hardware_profile": "default",
        "status": "active",

// …
```
Awesome.


Couple of things to do:

1. There are still commented out lines in the diff. Please remove all of them. To get a meaningful diff you can do something like this:

```
    $ git diff develop HEAD --name-only | grep -v '^vendor/' | xargs git diff develop HEAD --
```

2. POWER column shows true or false in the table. Can you make it on or off instead?

```
$ ./gscloud server ls

SERVER  SPECIFICATIONS  POWER  CURRENTPRICE  
s1      Core/s 1 RAM 1  false  0             
s2      Core/s 1 RAM 2  false  0             
s3      Core/s 1 RAM 2  true   0          
```

3. Split up SPECIFICATIONS column into two MEM and CORE and display only numbers in the rows?

4. There is a blank line at the start in the output. Remove it. Should look like this:
```
$ ./gscloud server ls
SERVER  CORE MEM  POWER
s1      1    1     off
s2      1    2     off 
s3      1    2     on  
```

5. remove CURRENTPRICE for now from table
comment
created
c0dehard
username_0
The [**nl**](https://www.computerhope.com/jargon/n/newline.htm) issue was caused by github.com/rodaine/table/table.go : line 209 

[Figured out the issue was already known](https://github.com/rodaine/table/issues/12#issue-314332218)

```{.go .numberLines startFrom="206"}
func (t *table) Print() {
	format := strings.Repeat("%s", len(t.header)) + "\n"
	t.calculateWidths()
	fmt.Fprintln(t.Writer)
	t.printHeader(format)
	for _, row := range t.rows {
		t.printRow(format, row)
	}
}
```

```shell
$ ./command table 

SERVER  CORE  MEM  POWER  
s1      1     1    off    
s2      1     2    off    
```

___



##### So i  just removed it

```{.go .numberLines startFrom="206"}
func (t *table) Print() {
	format := strings.Repeat("%s", len(t.header)) + "\n"
	t.calculateWidths()
	t.printHeader(format)
	for _, row := range t.rows {
		t.printRow(format, row)
	}
}
```

```shell
$ ./command table 
SERVER  CORE  MEM  POWER  
s1      1     1    off    
s2      1     2    off    
```
comment
created
bkircher
username_1
Yeah, but this is not a change that can be merged. Anyway lets postpone this requested change for later.

As for the other changes. Please make sure that your commits follow https://chris.beams.io/posts/git-commit/#seven-rules. (Remember, it is your PR. This means you want to integrate your changes into this project. So it is your responsibility to make this PR as cleanly reviewable and understandable as possible.)

Idea: maybe squash this branch and force push again and add a comment with open things that need to be done and change requests that have already be done.
comment