Ran go fmt on code.
parent
61f9a6e395
commit
4476d0f449
20
main.go
20
main.go
|
@ -1,15 +1,15 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"bufio"
|
||||||
"flag"
|
"flag"
|
||||||
"path"
|
"fmt"
|
||||||
"path/filepath"
|
|
||||||
"os"
|
|
||||||
"os/user"
|
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"bufio"
|
"os"
|
||||||
|
"os/user"
|
||||||
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -79,10 +79,10 @@ func GetVenture(args []string) error {
|
||||||
|
|
||||||
// Trim trailing newline (if any)
|
// Trim trailing newline (if any)
|
||||||
venture = strings.TrimSpace(venture)
|
venture = strings.TrimSpace(venture)
|
||||||
|
|
||||||
fmt.Println(venture)
|
fmt.Println(venture)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetVenture sets the curent user's venture, either by reading the value from the command line or by prompting the user to input it interactively.
|
// SetVenture sets the curent user's venture, either by reading the value from the command line or by prompting the user to input it interactively.
|
||||||
|
@ -116,7 +116,7 @@ func SetVenture(args []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepend status with user's name
|
// Prepend status with user's name
|
||||||
input = "~"+curUser.Username+input
|
input = "~" + curUser.Username + input
|
||||||
|
|
||||||
// Write file and create if it doesn't exist as world-readable.
|
// Write file and create if it doesn't exist as world-readable.
|
||||||
err = ioutil.WriteFile(outputPath, []byte(input), 0644)
|
err = ioutil.WriteFile(outputPath, []byte(input), 0644)
|
||||||
|
@ -125,4 +125,4 @@ func SetVenture(args []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue