amo/cmd/amocli/updatecom.go
2024-06-05 17:50:54 +05:00

30 lines
636 B
Go

package main
import "surdeus.su/core/amo"
//import "surdeus.su/core/amo/api"
import "surdeus.su/core/cli/mtool"
//import "surdeus.su/core/amo/companies"
//import "encoding/json"
//import "log"
//import "os"
type CompanyUpdater struct{}
func (u CompanyUpdater) UpdateValues(
c *amo.Client, cs []amo.Company,
) ([]amo.Company, error) {
return c.UpdateCompanies(cs)
}
func (u CompanyUpdater) GetNameMul() string {
return "companies"
}
func (u CompanyUpdater) GetFuncName() string {
return "amo.UpdateCompanies"
}
var updateComs =
mtool.T("update-companies").Func(func(flags *mtool.Flags){
RunUpdater(CompanyUpdater{}, flags)
})