Disable queries without shard key

Is there a way to fail the execution of queries without a shard key? Can I do that based on a flag set by Golang driver?