Automatic Detection and Resolution of Deadlocks in Go Programs