libgo: update to Go 1.11
[official-gcc.git] / libgo / go / path / filepath / example_test.go
blobd019c260c58343c51f52ee64e61b39c624a00f6a
1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build ignore
7 package filepath_test
9 import (
10 "fmt"
11 "path/filepath"
14 func ExampleExt() {
15 fmt.Printf("No dots: %q\n", filepath.Ext("index"))
16 fmt.Printf("One dot: %q\n", filepath.Ext("index.js"))
17 fmt.Printf("Two dots: %q\n", filepath.Ext("main.test.js"))
18 // Output:
19 // No dots: ""
20 // One dot: ".js"
21 // Two dots: ".js"