I told my family (parents and siblings) because we think that when you go under general anesthesia, your loved ones should know about it. But I also said that I didn't really want to talk about it, and they've respected that. It depends on your family. My big concern used to be that the family will be super-supportive, and if I gain back, they'll judge me. Sometimes all the encouragement can be daunting.
As far as co-workers, I work with an amazing bunch of people, and I told them, mainly because I knew the liquid diet was going to make me an evil demon woman, and I wanted to warn them. They've been really nice about it.
Bottom line is that you need to do what works for you. Tell people as much as you're comfortable telling them.