Source file test/fixedbugs/issue32778.dir/a.go

     1  // Copyright 2019 The Go Authors. All rights reserved. Use of this
     2  // source code is governed by a BSD-style license that can be found in
     3  // the LICENSE file.
     4  
     5  package a
     6  
     7  import "strings"
     8  
     9  type Name string
    10  
    11  type FullName string
    12  
    13  func (n FullName) Name() Name {
    14  	if i := strings.LastIndexByte(string(n), '.'); i >= 0 {
    15  		return Name(n[i+1:])
    16  	}
    17  	return Name(n)
    18  }
    19  

View as plain text