<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Linda_pp</title>
    <description>The latest articles on DEV Community by Linda_pp (@rhysd).</description>
    <link>https://dev.to/rhysd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F114372%2F4113483a-c0b4-41db-80fc-27ccbe034710.jpeg</url>
      <title>DEV Community: Linda_pp</title>
      <link>https://dev.to/rhysd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rhysd"/>
    <language>en</language>
    <item>
      <title>TIL: window.setImmediate() has gone</title>
      <dc:creator>Linda_pp</dc:creator>
      <pubDate>Sun, 20 Jan 2019 17:34:41 +0000</pubDate>
      <link>https://dev.to/rhysd/til-windowsetimmediate-has-gone-18j2</link>
      <guid>https://dev.to/rhysd/til-windowsetimmediate-has-gone-18j2</guid>
      <description>&lt;p&gt;&lt;code&gt;window.setImmediate&lt;/code&gt; was non-standard browser API to execute given function as soon as possible in another JavaScript context.&lt;br&gt;
But Chrome removed this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VM237:1 Uncaught ReferenceError: setImmediate is not defined
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The alternative is &lt;code&gt;window.queueMicrotask()&lt;/code&gt;, which was defined by WHATWG as standard spec.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing"&gt;https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;queueMicrotask&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;this code runs as soon as possible!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>browser</category>
    </item>
    <item>
      <title>TIL: How to Resolve Go Import Paths in Go</title>
      <dc:creator>Linda_pp</dc:creator>
      <pubDate>Sat, 01 Dec 2018 17:33:03 +0000</pubDate>
      <link>https://dev.to/rhysd/til-how-to-resolve-go-import-paths-in-go-32dn</link>
      <guid>https://dev.to/rhysd/til-how-to-resolve-go-import-paths-in-go-32dn</guid>
      <description>&lt;p&gt;Go import path is corresponding to one directory in filesystem. For example, &lt;code&gt;import "fmt"&lt;/code&gt; is resolved to &lt;code&gt;/usr/local/opt/go/libexec/src/fmt&lt;/code&gt; (&lt;code&gt;opt&lt;/code&gt; is a symlink to directory of the latest Go installation by Homebrew) in my environment.&lt;/p&gt;

&lt;p&gt;I needed to resolve the import paths in Go.&lt;/p&gt;

&lt;p&gt;At first, I tried &lt;code&gt;go/ast&lt;/code&gt; and &lt;code&gt;go/types&lt;/code&gt; packages. They both have &lt;code&gt;ast.Package&lt;/code&gt;, &lt;code&gt;ast.ImportSpec&lt;/code&gt; and &lt;code&gt;types.Package&lt;/code&gt; structs. But none of them has the directory path of package. They only have its path (e.g. &lt;code&gt;"fmt"&lt;/code&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://golang.org/pkg/go/ast/#Package"&gt;https://golang.org/pkg/go/ast/#Package&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://golang.org/pkg/go/ast/#ImportSpec"&gt;https://golang.org/pkg/go/ast/#ImportSpec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://golang.org/pkg/go/types/#Package"&gt;https://golang.org/pkg/go/types/#Package&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But Go compiler resolves each import paths. To know how it does, I explored Go sources. Type checker needs to resolve import paths to know types of symbols from external package. So it must resolve import paths.&lt;/p&gt;

&lt;p&gt;Actually resolving paths is done in &lt;code&gt;Importer&lt;/code&gt; interface value in type checking. There are three types of importers provided by Go standard library; &lt;code&gt;gc&lt;/code&gt;, &lt;code&gt;gccgo&lt;/code&gt; and &lt;code&gt;source&lt;/code&gt;, where &lt;code&gt;gc&lt;/code&gt; is for a standard Go compiler, &lt;code&gt;gccgo&lt;/code&gt; is for cgo, and &lt;code&gt;source&lt;/code&gt; is for static analysis tools.&lt;br&gt;
&lt;code&gt;source&lt;/code&gt; seemed to match to my use case.&lt;/p&gt;

&lt;p&gt;Implementation of &lt;code&gt;source&lt;/code&gt; importer is in &lt;code&gt;go/internal&lt;/code&gt; package.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/golang/go/blob/624e197c71b673f0b3ebc57f774536131b4f0f26/src/go/internal/srcimporter/srcimporter.go#L23"&gt;https://github.com/golang/go/blob/624e197c71b673f0b3ebc57f774536131b4f0f26/src/go/internal/srcimporter/srcimporter.go#L23&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And I found how it resolves import paths.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;bp,  err := p.ctxt.Import(path,  srcDir,  0)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;where &lt;code&gt;ctxt&lt;/code&gt; is instance of &lt;code&gt;go/build.Context&lt;/code&gt;. It utilizes &lt;code&gt;go/build.Context.Import&lt;/code&gt; method.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://golang.org/pkg/go/build/#Context.Import"&gt;https://golang.org/pkg/go/build/#Context.Import&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's see if it gives what I want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"go/build"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// Use default context&lt;/span&gt;
    &lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Default&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;importPath&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"fmt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;"github.com/pkg/errors"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;importPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FindOnly&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;importPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"-&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Dir&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fmt -&amp;gt; /usr/local/Cellar/go/1.11.2/libexec/src/fmt
github.com/pkg/errors -&amp;gt; /Users/rhysd/.go/src/github.com/pkg/errors
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Yay! I finally could resolve import paths into directory paths.&lt;/p&gt;

&lt;p&gt;Setting &lt;code&gt;build.FindOnly&lt;/code&gt; flag is better to avoid cost to collect the entire package information.&lt;/p&gt;

&lt;p&gt;Note: Go version is 1.11.2&lt;/p&gt;

</description>
      <category>go</category>
    </item>
    <item>
      <title>TIL: Pitfall on getting all environment variables in Go</title>
      <dc:creator>Linda_pp</dc:creator>
      <pubDate>Tue, 13 Nov 2018 15:24:58 +0000</pubDate>
      <link>https://dev.to/rhysd/til-pitfall-on-getting-all-environment-variables-with-go-2i6n</link>
      <guid>https://dev.to/rhysd/til-pitfall-on-getting-all-environment-variables-with-go-2i6n</guid>
      <description>&lt;p&gt;Hello, this is my first post at DEV.TO 🐶&lt;/p&gt;

&lt;p&gt;To get the list of all environment variables in Go, I found a function to do that in standard libraries&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://golang.org/pkg/os/#Environ"&gt;&lt;code&gt;os.Environ()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Environ returns a copy of strings representing the environment, in the form "key=value".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using this function, I tried to write a function to get all environment variables key-value pairs in &lt;code&gt;map[string]string&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bad example 😣
&lt;/h2&gt;

&lt;p&gt;I at first wrote following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;kv&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Environ&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;map&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kv&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;kv&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IndexRune&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sc"&gt;'='&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;// `m` is what I wanted!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This example looked working fine at first, however later I found in some case it did not work only on Windows.&lt;/p&gt;

&lt;p&gt;I found that the &lt;code&gt;m&lt;/code&gt; contains empty string key &lt;code&gt;""&lt;/code&gt; and checked the output from &lt;code&gt;os.Environ()&lt;/code&gt; line by line. And finally I found the cause.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=C:=C:\path\to\current\dir
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;What's this? But environment variable &lt;code&gt;$=C:&lt;/code&gt; was actually existing on system. It was a hidden environment variable not listed in output of &lt;code&gt;set&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;I dug Go standard library and found a comment (thank you &lt;a class="comment-mentioned-user" href="https://dev.to/mattn"&gt;@mattn&lt;/a&gt;
 for helping me to find out this!).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/syscall/env_windows.go#L58-L60"&gt;https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/syscall/env_windows.go#L58-L60&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Environment variables can begin with =&lt;br&gt;
so start looking for the separator = at j=1.&lt;br&gt;
&lt;a href="https://blogs.msdn.com/b/oldnewthing/archive/2010/05/06/10008132.aspx"&gt;https://blogs.msdn.com/b/oldnewthing/archive/2010/05/06/10008132.aspx&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The post in the comment, &lt;a href="https://blogs.msdn.com/b/oldnewthing/archive/2010/05/06/10008132.aspx"&gt;What are these strange =C: environment variables?&lt;/a&gt; explained what &lt;code&gt;$=C:&lt;/code&gt; is.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Okay, so the command processor sets these things, but what are they? They are a leftover from the command processor's attempt to mimic the old MS-DOS way that drives and directories were handled. Whereas in Win32, there is only one current directory, in MS-DOS, there was one current directory for each drive.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So this is a hidden special environment variable on Windows and I need to consider it on getting all environment variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good example 😆
&lt;/h2&gt;

&lt;p&gt;Fortunately, fix was easy. &lt;code&gt;=&lt;/code&gt; is at first character, and environment variable name is never empty. So we can simply ignore the first character.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;kv&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Environ&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;map&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kv&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;kv&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// On Windows, environment variable names may start with '=' (e.g. =C:).&lt;/span&gt;
    &lt;span class="c"&gt;// To handle the variables properly, skip first character of KEY=VALUE line.&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sc"&gt;'='&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;// `m` is what I wanted!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>go</category>
    </item>
  </channel>
</rss>
