On Tue, Nov 13, 2018 at 01:41:42PM +0100, Tomáš Golembiovský wrote:
+and install_linux_tools g inspect = + let os = match inspect.i_distro with + | "fedora" -> Some "fc28" + | "rhel" | "centos" | "scientificlinux" | "redhat-based" + | "oraclelinux" -> (match inspect.i_major_version with + | 6 -> Some "el6" + | 7 -> Some "el7" + | _ -> None) + | "sles" | "suse-based" | "opensuse" -> Some "lp151" + | _ -> None in
My preferred indentation for this would be: let os = match inspect.i_distro with | "fedora" -> Some "fc28" | "rhel" | "centos" | "scientificlinux" | "redhat-based" | "oraclelinux" -> (match inspect.i_major_version with | 6 -> Some "el6" | 7 -> Some "el7" | _ -> None) | "sles" | "suse-based" | "opensuse" -> Some "lp151" | _ -> None in as I think it's a little bit clearer. The patch however is fine apart from this whitespace. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top