DevBits
Home
Atlas
Play
About
Sign up
Log in
All
Go
File Systems
Get File Extension
Get File Extension in Go
Get File Extension in Go
Posted by
yhuang
Public (Editable by Users)
Language
Go
Dependencies
import "fmt"
import "path/filepath"
filepath.Ext()
fmt.Println()
Run
Go 1.15.5
Play
Copy
Copy To
Official Go Playground
Expand
Fork
Edit
main.go
package main import ( "fmt" "path/filepath" ) func main() { fmt.Println(filepath.Ext("hello.go")) }
Stdout
Stderr