Most languages have them, or allow them to be expressed. The name "Tagged Unions" literally comes from C.
Go does not. Java did not (maybe now with sealed types and exhausitvity checks on switch statement, but not sure if they've already landed).
Try this:
sealed interface Shape permits Circle, Rectangle { }
record Circle(double radius) implements Shape { }
record Rectangle(double length, double width) implements Shape { }
void test() {
Shape shape = new Circle(5);
switch (shape) {
case Circle _ -> System.out.println("Circle");
case Rectangle _ -> System.out.println("Rectangle"); // Comment out this line to get an error.
}
}