Domain-like magnetic structure in superconductors of ErRh4B4 and HoMo6S8 type