1
0
mirror of https://github.com/golang/go synced 2024-09-30 14:18:32 -06:00
go/refactor/eg/testdata/C.template
Alan Donovan bfcffc697d go.tools/refactor/eg: an example-based refactoring tool.
See refactor/eg/eg.go for details.

LGTM=crawshaw
R=crawshaw, gri, kamil.kisiel, josharian
CC=golang-codereviews
https://golang.org/cl/81010043
2014-04-02 12:24:55 -04:00

11 lines
373 B
Plaintext

package template
// Test of repeated use of wildcard in pattern.
// NB: multiple patterns would be required to handle variants such as
// s[:len(s)], s[x:len(s)], etc, since a wildcard can't match nothing at all.
// TODO(adonovan): support multiple templates in a single pass.
func before(s string) string { return s[:len(s)] }
func after(s string) string { return s }