The phrase is often used in a positive sense, to indicate that someone is determined to do something and will not give up easily. For example, someone might say "I'm going to go the whole hog and study hard for this exam." However, the phrase can also be used in a negative sense, to indicate that someone is being excessive or unreasonable. For example, someone might say "He went the whole hog and spent all of his money on a new car."
Regardless of its connotation, the phrase "go the whole hog" is a colorful and expressive way to say that someone is doing something completely or thoroughly.