如何在Go中覆盖符号链接?

I would like to overwrite a symlink using Go but I couldn't find how to do it.

If I try to create the symlink and it already exists an error is returned.

My code:

err := os.Symlink(filePath, symlinkPath)
if err != nil {
    fmt.Println(err)
}

I guess the symlink must be removed and then created again. Is that right? If so, how can I unlink the symlink?

Note that @Vadyus's answer hides actual filesystem errors while running lstat. For example, if your disk is broken and Lstat fails, you will still run os.Remove and ignore its error (DANGEROUS, unless you like to debug things for hours).

The following snippets checks for file existence and other errors correctly:

if _, err := os.Lstat(symlinkPath); err == nil {
  if err := os.Remove(symlinkPath); err != nil {
      return fmt.Errorf("failed to unlink: %+v", err)
  }
} else if os.IsNotExist(err) {
    return fmt.Errorf("failed to check symlink: %+v", err)
}

Just check that symlink exists and delete it before creating new one

if _, err := os.Lstat(symlinkPath); err == nil {
  os.Remove(symlinkPath)
}