File: example_test.go

package info (click to toggle)
golang-github-gedex-inflector 0.0~git20170307.0.16278e9-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 88 kB
  • ctags: 33
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2013 Akeda Bagus <admin@gedex.web.id>. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package inflector_test

import (
	"fmt"

	"github.com/gedex/inflector"
)

func ExampleSingularize() {
	fmt.Println(inflector.Singularize("People"))
	// Output:
	// Person
}

func ExamplePluralize() {
	fmt.Println(inflector.Pluralize("octopus"))
	// Output:
	// octopuses
}