drupal_goto not working in hook_init
The solution is to use the hook_preprocess_page().

function my_module_preprocess_page() {

    // redirect drupal edit page to our own module edit page.
    if (preg_match('/^node\/(\d+)\/edit$/', current_path(), $matches)) {
      $code = _my_module_check_code($matches[1]); //check if the nid is of the content type we need
      if ($code) {
        global $base_url;
        $url = $base_url.'/my_module/'.$code.'/edit';
        header('Location: ' . $url);
      }
      // If the code is not from the content type we need, we do nothing 
      // just leave drupal work it's way
    }

}


After clearing cache, all is working fine.