If you want to explore more of French colony with a blend of French culture go for Pondicherry. If you want to relax at a calm beach then go for Gokarna. Pondi beaches are more crowded than Gokarna. In my opinion, you have got 3 days right? Gokarna would be great. You have got lot of places in and around Gokarna to explore. In opinion, you don't require 3 days to explore Pondicherry unless you are interested in getting french vibes. Exploring Gokarna would be awesome. You will be lot in the nature.
Happy Exploring