My left leg has been hurting for 10 days. The leg hurts near the groin and the knee. My left foot swells at times. I'm diabetic but my A1c is 5.4

Many possibilities. Your pain could be as a result of many different things. A thorough history and physical exam and possibly some laboratory and radiology exams are needed to determine the exact cause. Causes of pain may include: trauma (fracture, sprain, arthritis), infection, metabolic conditions (gout), circulatory, musculoskeletal or biomechanical abnormality and neurologic conditions (neuropathy).
It's . It's hard to tell exactly what's going on without more information, but one concern I have with what you wrote is the possibility of a blood clot in a vein, which would cause both leg pain and foot swelling. Please go visit your primary care physician and get checked out to make sure this is not the problem. Good luck!