aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_go2work.go
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-05 11:31:50 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-05 11:31:50 +0200
commit75f55585aaeaa7bd9fcf2ec144ee8e890128a32a (patch)
treecf049b898b6fad321cdc057758a49d567135d837 /src/c_go2work.go
parentMan update (diff)
downloadgo2work-75f55585aaeaa7bd9fcf2ec144ee8e890128a32a.tar.gz
go2work-75f55585aaeaa7bd9fcf2ec144ee8e890128a32a.tar.bz2
go2work-75f55585aaeaa7bd9fcf2ec144ee8e890128a32a.tar.xz
go2work-75f55585aaeaa7bd9fcf2ec144ee8e890128a32a.tar.zst
go2work-75f55585aaeaa7bd9fcf2ec144ee8e890128a32a.zip
Added README.org
Diffstat (limited to 'src/c_go2work.go')
-rw-r--r--src/c_go2work.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/c_go2work.go b/src/c_go2work.go
index 1103c92..bda98f3 100644
--- a/src/c_go2work.go
+++ b/src/c_go2work.go
@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* go2work: src/c_go2work.go
- * Mon Apr 4 19:31:34 CEST 2022
+ * Tue Apr 5 11:11:13 CEST 2022
* Joe
*
* The main.
@@ -61,7 +61,7 @@ func main() {
var options Options
log.SetPrefix(PROGNAME + ": ")
log.SetFlags(0)
- if len(os.Args[0:]) == 1 {
+ if len(os.Args) == 1 {
print_help()
os.Exit(1)
return
@@ -90,17 +90,7 @@ func main() {
dest_t[SECS] = 0
}
options = parse_options()
- if check_time_format(dest_t) == false {
- log.Fatal(LOG_FORMAT)
- return
- }
- if check_media_player(options.Media_player) == false {
- log.Fatal("media player (" + options.Media_player + ") not found")
- return
- }
- if options.Fortune == true && check_fortune() == false {
- print_fortune_not_found()
- }
+ first_checks(dest_t, options)
curr_t = get_time()
print_time_left(curr_t, dest_t)
main_loop(dest_t, options)