In the Go programming language, to get the file name extension used by the given path – we use the Ext() function of path/filepath package. The Ext() function returns the file name extension used by the given path. The extension is the suffix beginning at the final dot in the final element of the given path; it is empty if there is no dot.
Syntax:
Consider the below Golang program demonstrating get the file name extension used by the given path?
Output
need an explanation for this answer? contact us directly to get an explanation for this answer