@@ -132,10 +132,6 @@ <h2 id="tools">Tools</h2>
132
132
133
133
< h3 id ="modules "> Modules, package versioning, and dependency management</ h3 >
134
134
< p >
135
- < strong >
136
- NOTE: This is not present in go1.11beta1 but will be available in future
137
- betas and subsequent releases.
138
- </ strong >
139
135
Go 1.11 adds preliminary support for a < a href ="/cmd/go/#hdr-Modules__module_versions__and_more "> new concept called “modules,”</ a >
140
136
an alternative to GOPATH with integrated support for versioning and
141
137
package distribution.
@@ -711,19 +707,35 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
711
707
< dl id ="text/scanner "> < dt > < a href ="/pkg/text/scanner/ "> text/scanner</ a > </ dt >
712
708
< dd >
713
709
< p > <!-- CL 112037 -->
714
- TODO: < a href ="https://golang.org/cl/112037 "> https://golang.org/cl/112037</ a > : return RawString token rather than String for raw string literals
710
+ < code > Scan()</ code > now returns a < code > RawString</ code > token instead of < code > String</ code >
711
+ for raw string literals.
715
712
</ p >
716
713
717
714
</ dl > <!-- text/scanner -->
718
715
719
716
< dl id ="text/template "> < dt > < a href ="/pkg/text/template/ "> text/template</ a > </ dt >
720
717
< dd >
721
718
< p > <!-- CL 84480 -->
722
- TODO: < a href ="https://golang.org/cl/84480 "> https://golang.org/cl/84480</ a > : add variable assignments
719
+ Modifying template variables via assignments is now permitted via the < code > =</ code > token:
720
+ </ p >
721
+ < pre >
722
+ {{"{{"}} $v := "init" {{"}}"}}
723
+ {{"{{"}} if true {{"}}"}}
724
+ {{"{{"}} $v = "changed" {{"}}"}}
725
+ {{"{{"}} end {{"}}"}}
726
+ v: {{"{{"}} $v {{"}}"}} {{"{{"}}/* "changed" */{{"}}"}}</ pre >
727
+
728
+ < p >
729
+ This required backwards-incompatible changes to the < code > text/template/parse</ code >
730
+ package, but was deemed acceptable since the package's documentation clearly states
731
+ that it isn't intended for general use.
723
732
</ p >
724
733
725
734
< p > <!-- CL 95215 -->
726
- TODO: < a href ="https://golang.org/cl/95215 "> https://golang.org/cl/95215</ a > : differentiate nil from missing arg
735
+ In previous versions, passing an untyped nil to a template function
736
+ would result in an incorrect error stating that the function was missing an argument.
737
+ Errors resulting from untyped nil values being passed to template-evaluated functions
738
+ are now properly reported.
727
739
</ p >
728
740
729
741
</ dl > <!-- text/template -->
0 commit comments