Original post

I want to get reverse complementary DNA sequences regardless of being capital or lower case.
For example, I can easily get reverse complementary sequences using Perl as shown below.

$sequence=“ATgcccA”;$reversecomplementray=reverse $sequence;

I will get TgggcAT from ATgcccA.

First I tried to get complementary DNA sequences like TAcgggT from ATgcccA.
But using replace in golang (if I replace in A, T, G, C order), I will get TTgccT, AAgccA, AAcccA, and AAgggA although I want to get TAcgggT.
I may be able to solve this problem in complex ways.
But it’s very annoying.
Is there an easy way to substitute multiple letters at the same time in golang?
Thanks in advance.
Complementary: A > T, T > A, G > C, C > G
Reverse: reverse order