You need to check the output of running the cmd.Run and also get your output using stdout is simpler than using the pipe.
cmd :=exec.Command("sudo","su",username, "-c",command)
cmd.Stderr = os.Stdout
cmd.Stdout = os.Stdout
err := cmd.Run()
CheckErr(err)
That should give you visibility of the error so you can find out what is occuring that prevents the sudo.