1
0
mirror of https://github.com/golang/go synced 2024-11-24 09:10:24 -07:00
go/doc
Russ Cox 6e3e380923 allow direct conversion between string and named []byte, []rune
The allowed conversions before and after are:
        type Tstring string
        type Tbyte []byte
        type Trune []rune

        string <-> string  // ok
        string <-> []byte  // ok
        string <-> []rune // ok
        string <-> Tstring // ok
        string <-> Tbyte // was illegal, now ok
        string <-> Trune // was illegal, now ok

        Tstring <-> string  // ok
        Tstring <-> []byte  // ok
        Tstring <-> []rune // ok
        Tstring <-> Tstring // ok
        Tstring <-> Tbyte // was illegal, now ok
        Tstring <-> Trune // was illegal, now ok

Update spec, compiler, tests.  Use in a few packages.

We agreed on this a few months ago but never implemented it.

Fixes #1707.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5421057
2011-11-22 12:30:02 -05:00
..
codelab/wiki renaming_4: gofix -r everything/but/src/pkg 2011-11-08 15:43:02 -08:00
codewalk renaming_4: gofix -r everything/but/src/pkg 2011-11-08 15:43:02 -08:00
devel weekly.2011-11-18 2011-11-19 07:20:02 +11:00
gopher
play godoc: add dummy playground.js to silence godoc warning at start-up 2011-08-22 14:06:07 -07:00
progs doc/progs: fix windows version to satisfy new error 2011-11-14 20:53:03 +11:00
talks renaming_4: gofix -r everything/but/src/pkg 2011-11-08 15:43:02 -08:00
all.css go/doc, godoc, gotest: support for reading example documentation 2011-10-06 11:56:17 -07:00
button_background.png
code.html
codereview_with_mq.html
community.html
contrib.html
contribute.html
debugging_with_gdb.html all: rename os.Error to error in various non-code contexts 2011-11-01 22:58:09 -04:00
docs.html doc: link to Chinese translation of A Tour of Go 2011-11-18 15:22:48 +11:00
effective_go.html effective_go: a little more about comma ok and type assertion 2011-11-09 16:14:18 -08:00
effective_go.tmpl effective_go: a little more about comma ok and type assertion 2011-11-09 16:14:18 -08:00
ExpressivenessOfGo.pdf
frontpage.css
gccgo_contribute.html
gccgo_install.html doc: when configuring gold for gccgo, use --enable-gold=default 2011-09-19 11:54:07 -07:00
go_faq.html FAQ: rearrange and expand the discussion of testing 2011-11-09 13:19:23 -08:00
go_for_cpp_programmers.html
go_mem.html doc: fix memory model read visibility bug 2011-09-26 12:54:30 -04:00
go_spec.html allow direct conversion between string and named []byte, []rune 2011-11-22 12:30:02 -05:00
go_tutorial.html tutorial: describe unidirectional channels 2011-11-10 14:02:14 -08:00
go_tutorial.tmpl tutorial: describe unidirectional channels 2011-11-10 14:02:14 -08:00
go-logo-black.png
go-logo-blue.png
go-logo-white.png
GoCourseDay1.pdf
GoCourseDay2.pdf
GoCourseDay3.pdf
godocs.js godoc: generate package toc in template, not in JavaScript 2011-10-18 16:23:35 -04:00
ie.css
install.html codereview: undo last night's rollback 2011-11-18 12:58:44 -05:00
logo-153x55.png
logo.png
Makefile doc/Makefile: add 'all' rule to build all docs 2011-11-01 09:45:04 -07:00
makehtml effective_go: convert to use tmpltohtml. 2011-08-21 09:46:19 +10:00
play_overlay.png
playground.html
popups.js
root.html doc: refer to tour.golang.org instead of go-tour.appspot.com 2011-11-01 16:09:29 +09:00
sieve.gif
tmpltohtml.go renaming_4: gofix -r everything/but/src/pkg 2011-11-08 15:43:02 -08:00
video-001.png
video-002.png
video-003.png
video-004.png
video-005.jpg