Bash to golang
Budget: £10 – £20 GBP
Hello
I jave about 15 lines in bash i want to convert in golang language and i need help with this please
Thank you.
Code below
#!/bin/bash
ver=$(</usr/local/cpanel/.ltrc)
if [ "$1" == "-json" ]; then
if [ "$2" == "./listaccts" ] || [ "$2" == "listaccts" ]; then
return=$(cpd "$ver" /usr/local/cpanel/whostmgr/bin/xml-api2 $1 $2 $3 $4 $5 $6)
code=$?
echo "$return";
exit $code;
fi;
fi;
return=$(cpd "$ver" /usr/local/cpanel/whostmgr/bin/.xml-api $1 $2 $3 $4 $5 $6)
code=$?
echo "$return";
exit $code;
I jave about 15 lines in bash i want to convert in golang language and i need help with this please
Thank you.
Code below
#!/bin/bash
ver=$(</usr/local/cpanel/.ltrc)
if [ "$1" == "-json" ]; then
if [ "$2" == "./listaccts" ] || [ "$2" == "listaccts" ]; then
return=$(cpd "$ver" /usr/local/cpanel/whostmgr/bin/xml-api2 $1 $2 $3 $4 $5 $6)
code=$?
echo "$return";
exit $code;
fi;
fi;
return=$(cpd "$ver" /usr/local/cpanel/whostmgr/bin/.xml-api $1 $2 $3 $4 $5 $6)
code=$?
echo "$return";
exit $code;