func (f *factory) SetConfig(config davconf.Config) { client := davclient.NewClient(config) f.cmds = map[string]Cmd{ "put": newPutCmd(client), "get": newGetCmd(client), } }
func buildFactory() (client davclient.Client, factory Factory) { config := davconf.Config{User: "******"} client = davclient.NewClient(config) factory = NewFactory() factory.SetConfig(config) return }
func runGet(config davconf.Config, args []string) (err error) { davClient := davclient.NewClient(config) cmd := newGetCmd(davClient) return cmd.Run(args) }