updatecom.go 636 B

123456789101112131415161718192021222324252627282930
  1. package main
  2. import "surdeus.su/core/amo"
  3. //import "surdeus.su/core/amo/api"
  4. import "surdeus.su/core/cli/mtool"
  5. //import "surdeus.su/core/amo/companies"
  6. //import "encoding/json"
  7. //import "log"
  8. //import "os"
  9. type CompanyUpdater struct{}
  10. func (u CompanyUpdater) UpdateValues(
  11. c *amo.Client, cs []amo.Company,
  12. ) ([]amo.Company, error) {
  13. return c.UpdateCompanies(cs)
  14. }
  15. func (u CompanyUpdater) GetNameMul() string {
  16. return "companies"
  17. }
  18. func (u CompanyUpdater) GetFuncName() string {
  19. return "amo.UpdateCompanies"
  20. }
  21. var updateComs =
  22. mtool.T("update-companies").Func(func(flags *mtool.Flags){
  23. RunUpdater(CompanyUpdater{}, flags)
  24. })