Former first minister Nicola Sturgeon has said she felt a “sense of affinity” with Boris Johnson while reading his memoir.