annotate cmd_root.go @ 14:1e21b0c29775

remove create page msg
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 17 Dec 2020 11:12:04 +0900
parents 3032e9f78e4b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 package growsync
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 import (
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 "context"
3
3032e9f78e4b add new cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
5 "fmt"
1
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 "io"
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 )
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 type rootCmd struct{}
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 func (pc *rootCmd) name() string {
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 return "root"
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 }
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 func (pc *rootCmd) description() string {
3
3032e9f78e4b add new cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
16 return "show document root"
1
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 }
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
3
3032e9f78e4b add new cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
19 func (pc *rootCmd) run(ctx context.Context, args []string, config *growiConfig, outputWriter io.Writer, errorWriter io.Writer) error {
3032e9f78e4b add new cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
20 fmt.Fprintln(outputWriter, config.LocalRoot)
1
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 return nil
76695bcbe426 write cmd
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 }