Situation. Battle has erupted down a corridor 10 feet wide, fighter ally on one side, goblin1 on the other therefore taking up the ten foot wide corridor. My rogue needs to pass through the fighters space to get to the other side to attack another goblin2 standing next to his goblin1 mate in battle. As my rogue passes through does goblin1 get an opportunity attack on me? Also since I am now next to the fighter I can sneak attack without advantage on goblin 1?
No and yes, respectively.
Moving through an ally's space is difficult terrain, and costs twice as much movement to do. However, the only thing that provokes opportunity attacks is leaving the reach of an enemy. You can move through the fighter's space without provoking, but you will provoke if any part of your movement leaves goblin 1's reach.
Once you are past the ally, you can make melee attacks on goblin 1. Since the fighter is another enemy of the goblin, is within 5 feet of the target, and is not incapacitated, you don't need advantage on the attack roll to get sneak attack providing you don't have disadvantage.
"Squeezing" is probably not relevant to your question. It's what happens when a creature tries to move through a space physically too small for it. While you are in such a space, you have disadvantage on attack rolls, which would prevent you from making sneak attacks. However, the situation you describe does not involve squeezing.