It is also the duty of the attorney general and reporter, in the case of state officers, and of the district attorney general and the county attorney, if there is one in the county, in the case of county officers, and of the city attorney, or the district attorney general, in case of municipal officers, to file such petition or complaint, upon being directed or requested in writing so to do by the governor.