~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/strings/reader.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
// read yet.
50
50
func (r *Reader) UnreadByte() os.Error {
51
51
        if r.i <= 0 {
52
 
                return os.ErrorString("strings.Reader: at beginning of string")
 
52
                return os.NewError("strings.Reader: at beginning of string")
53
53
        }
54
54
        r.i--
55
55
        r.prevRune = -1
80
80
// The last method called on r must have been ReadRune.
81
81
func (r *Reader) UnreadRune() os.Error {
82
82
        if r.prevRune < 0 {
83
 
                return os.ErrorString("strings.Reader: previous operation was not ReadRune")
 
83
                return os.NewError("strings.Reader: previous operation was not ReadRune")
84
84
        }
85
85
        r.i = r.prevRune
86
86
        r.prevRune = -1