Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository
  • go
  • src
  • bytes
  • buffer.go
Find file BlameHistoryPermalink
  • Alberto Donizetti's avatar
    bytes: note that NewBuffer's initial size can change · c64006ab
    Alberto Donizetti authored Aug 29, 2018
    bytes.NewBuffer's documentation says it can be used to set the initial
    size of the buffer. The current wording is:
    
    > It can also be used to size the internal buffer for writing.
    
    This may led users to believe that the buffer (its backing array) is
    fixed in size and won't grow, which isn't true (subsequent Write calls
    will expand the backing array as needed).
    
    Change the doc to make it clearer that NewBuffer just sets the initial
    size of the buffer.
    
    Fixes #27242
    
    Change-Id: I2a8cb5bee02ca2c1657ef59e2cf1434c7a9bd397
    Reviewed-on: https://go-review.googlesource.com/132035
    
    
    Reviewed-by: default avatarDominik Honnef <dominik@honnef.co>
    Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    c64006ab
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7