Get File Extension in Go

Posted by yhuang
Public (Editable by Users)
Go
Edit
package main

import (
	"fmt"
	"path/filepath"
)

func main() {
	fmt.Println(filepath.Ext("hello.go"))
}