Quick actions

cmd+k|ctrl+k

Navigation

Languages

Working with files and I/O / File path operations / Essential Go

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-26T09:42:45Z

Updated

2019-03-26T09:42:45Z

package main

import (
	"fmt"
	"path/filepath"
)

func main() {
	ext := filepath.Ext("file.txt")
	fmt.Printf("ext: %s\n", ext)
}
INFO