LEFT | RIGHT |
(no file at all) | |
1 // Go support for Protocol Buffers - Google's data interchange format | 1 // Go support for Protocol Buffers - Google's data interchange format |
2 // | 2 // |
3 // Copyright 2010 Google Inc. All rights reserved. | 3 // Copyright 2010 The Go Authors. All rights reserved. |
4 // http://code.google.com/p/goprotobuf/ | 4 // http://code.google.com/p/goprotobuf/ |
5 // | 5 // |
6 // Redistribution and use in source and binary forms, with or without | 6 // Redistribution and use in source and binary forms, with or without |
7 // modification, are permitted provided that the following conditions are | 7 // modification, are permitted provided that the following conditions are |
8 // met: | 8 // met: |
9 // | 9 // |
10 // * Redistributions of source code must retain the above copyright | 10 // * Redistributions of source code must retain the above copyright |
11 // notice, this list of conditions and the following disclaimer. | 11 // notice, this list of conditions and the following disclaimer. |
12 // * Redistributions in binary form must reproduce the above | 12 // * Redistributions in binary form must reproduce the above |
13 // copyright notice, this list of conditions and the following disclaimer | 13 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 // First, find the last element | 1743 // First, find the last element |
1744 if i := strings.LastIndex(name, "/"); i >= 0 { | 1744 if i := strings.LastIndex(name, "/"); i >= 0 { |
1745 name = name[i+1:] | 1745 name = name[i+1:] |
1746 } | 1746 } |
1747 // Now drop the suffix | 1747 // Now drop the suffix |
1748 if i := strings.LastIndex(name, "."); i >= 0 { | 1748 if i := strings.LastIndex(name, "."); i >= 0 { |
1749 name = name[0:i] | 1749 name = name[0:i] |
1750 } | 1750 } |
1751 return name | 1751 return name |
1752 } | 1752 } |
LEFT | RIGHT |