amo/cmd/amocli/updatecom.go

31 lines
636 B
Go
Raw Normal View History

package main
import "surdeus.su/core/amo"
2024-06-05 15:50:54 +03:00
//import "surdeus.su/core/amo/api"
import "surdeus.su/core/cli/mtool"
2024-06-05 15:50:54 +03:00
//import "surdeus.su/core/amo/companies"
//import "encoding/json"
//import "log"
//import "os"
2024-06-05 15:50:54 +03:00
type CompanyUpdater struct{}
2024-06-04 23:16:12 +03:00
2024-06-05 15:50:54 +03:00
func (u CompanyUpdater) UpdateValues(
c *amo.Client, cs []amo.Company,
) ([]amo.Company, error) {
return c.UpdateCompanies(cs)
}
2024-06-05 15:50:54 +03:00
func (u CompanyUpdater) GetNameMul() string {
return "companies"
}
2024-06-05 15:50:54 +03:00
func (u CompanyUpdater) GetFuncName() string {
return "amo.UpdateCompanies"
}
2024-06-05 15:50:54 +03:00
var updateComs =
mtool.T("update-companies").Func(func(flags *mtool.Flags){
RunUpdater(CompanyUpdater{}, flags)
})