Formula as well?

So in wantig to breastfeed my baby when she is born tills year old. I have been told to get a back up box of formula "just in case" or at least a few small cartons for the hosptial again for "just in case" cases. I do have gestational diabetes so I know I my baby may need extra feeds but I'm hopeing to collect colostrum for these.
With my first daughter I was very young and nieave and just gave up breastfeeding because the midwifes said to and have no advice at all and it really upset me but I know this contributed to my post natel depression and don't wanna go through that again im a lot more determined. 
So what you ladies think I should do??