feat: more tools
parent
08d9ced335
commit
073c52f5fe
|
@ -342,7 +342,7 @@ internal
|
|||
<p>Example:</p>
|
||||
<div class="highlight highlight-source-go">
|
||||
<pre><span class="pl-k">var</span> <span class="pl-s1">bufPool</span> <span class="pl-c1">=</span> sync.<span class="pl-smi">Pool</span>{
|
||||
<span class="pl-c1">New</span>: <span class="pl-k">func</span>() <span class="pl-smi">any</span> {
|
||||
<span class="pl-s1">New</span>: <span class="pl-k">func</span>() <span class="pl-smi">any</span> {
|
||||
<span class="pl-k">return</span> <span class="pl-en">new</span>(bytes.<span class="pl-smi">Buffer</span>)
|
||||
},
|
||||
}
|
||||
|
@ -388,13 +388,13 @@ internal
|
|||
</p>
|
||||
<div class="highlight highlight-source-go">
|
||||
<pre><span class="pl-c">// Ptr takes in non-pointer and returns a pointer</span>
|
||||
<span class="pl-k">func</span> <span class="pl-s1">Ptr</span>[<span class="pl-s1">T</span> <span class="pl-en">any</span>](<span class="pl-s1">v</span> <span class="pl-smi">T</span>) <span class="pl-c1">*</span><span class="pl-smi">T</span> {
|
||||
<span class="pl-k">func</span> <span class="pl-en">Ptr</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>](<span class="pl-s1">v</span> <span class="pl-smi">T</span>) <span class="pl-c1">*</span><span class="pl-smi">T</span> {
|
||||
<span class="pl-k">return</span> <span class="pl-c1">&</span><span class="pl-s1">v</span>
|
||||
}</pre>
|
||||
</div>
|
||||
<p>Return zero value:</p>
|
||||
<div class="highlight highlight-source-go">
|
||||
<pre><span class="pl-k">func</span> <span class="pl-en">Zero</span>[<span class="pl-s1">T</span> <span class="pl-s1">any</span>]() <span class="pl-smi">T</span> {
|
||||
<pre><span class="pl-k">func</span> <span class="pl-en">Zero</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>]() <span class="pl-smi">T</span> {
|
||||
<span class="pl-k">var</span> <span class="pl-s1">zero</span> <span class="pl-smi">T</span>
|
||||
<span class="pl-k">return</span> <span class="pl-s1">zero</span>
|
||||
}</pre>
|
||||
|
@ -879,7 +879,7 @@ internal
|
|||
<pre><span class="pl-k">type</span> <span class="pl-smi">Drink</span> <span class="pl-smi">int</span>
|
||||
|
||||
<span class="pl-k">const</span> (
|
||||
<span class="pl-s1">Beer</span> <span class="pl-smi">Drink</span> <span class="pl-c1">=</span> <span class="pl-s1">iota</span>
|
||||
<span class="pl-s1">Beer</span> <span class="pl-smi">Drink</span> <span class="pl-c1">=</span> <span class="pl-c1">iota</span>
|
||||
<span class="pl-s1">Water</span>
|
||||
<span class="pl-s1">OrangeJuice</span>
|
||||
)</pre>
|
||||
|
|
|
@ -238,11 +238,11 @@
|
|||
<span class="pl-c1">wantErr</span> <span class="pl-smi">error</span>
|
||||
}{
|
||||
{
|
||||
<span class="pl-c1">req</span>: <span class="pl-smi">Request</span> {
|
||||
<span class="pl-c1">a</span>: <span class="pl-s">"a"</span>,
|
||||
<span class="pl-c1">b</span>: {
|
||||
<span class="pl-c1">c</span>: <span class="pl-s">"c"</span>,
|
||||
<span class="pl-c1">d</span>: {
|
||||
<span class="pl-s1">req</span>: <span class="pl-smi">Request</span> {
|
||||
<span class="pl-s1">a</span>: <span class="pl-s">"a"</span>,
|
||||
<span class="pl-s1">b</span>: {
|
||||
<span class="pl-s1">c</span>: <span class="pl-s">"c"</span>,
|
||||
<span class="pl-s1">d</span>: {
|
||||
<span class="pl-s">"e"</span>: <span class="pl-s1">e</span>
|
||||
}
|
||||
}
|
||||
|
@ -250,11 +250,11 @@
|
|||
<span class="pl-c">// Other fieles</span>
|
||||
},
|
||||
{
|
||||
<span class="pl-c1">req</span>: <span class="pl-smi">Request</span> {
|
||||
<span class="pl-c1">a</span>: <span class="pl-s">"a"</span>,
|
||||
<span class="pl-c1">b</span>: {
|
||||
<span class="pl-c1">c</span>: <span class="pl-s">"c"</span>,
|
||||
<span class="pl-c1">d</span>: {
|
||||
<span class="pl-s1">req</span>: <span class="pl-smi">Request</span> {
|
||||
<span class="pl-s1">a</span>: <span class="pl-s">"a"</span>,
|
||||
<span class="pl-s1">b</span>: {
|
||||
<span class="pl-s1">c</span>: <span class="pl-s">"c"</span>,
|
||||
<span class="pl-s1">d</span>: {
|
||||
<span class="pl-s">"e"</span>: <span class="pl-s1">e</span>
|
||||
}
|
||||
}
|
||||
|
@ -262,11 +262,11 @@
|
|||
<span class="pl-c">// Other fieles</span>
|
||||
},
|
||||
{
|
||||
<span class="pl-c1">req</span>: <span class="pl-smi">Request</span> {
|
||||
<span class="pl-c1">a</span>: <span class="pl-s">"a"</span>,
|
||||
<span class="pl-c1">b</span>: {
|
||||
<span class="pl-c1">c</span>: <span class="pl-s">"c"</span>,
|
||||
<span class="pl-c1">d</span>: {
|
||||
<span class="pl-s1">req</span>: <span class="pl-smi">Request</span> {
|
||||
<span class="pl-s1">a</span>: <span class="pl-s">"a"</span>,
|
||||
<span class="pl-s1">b</span>: {
|
||||
<span class="pl-s1">c</span>: <span class="pl-s">"c"</span>,
|
||||
<span class="pl-s1">d</span>: {
|
||||
<span class="pl-s">"e"</span>: <span class="pl-s1">e</span>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ doB context deadline exceeded</pre
|
|||
}
|
||||
|
||||
<span class="pl-k">return</span> <span class="pl-smi">disconnectedContext</span>{
|
||||
<span class="pl-c1">parent</span>: <span class="pl-s1">parent</span>,
|
||||
<span class="pl-s1">parent</span>: <span class="pl-s1">parent</span>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -573,6 +573,11 @@
|
|||
>https://github.com/pqrs-org/Karabiner-Elements</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/crystalidea/macs-fan-control"
|
||||
>https://github.com/crystalidea/macs-fan-control</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Memory</p>
|
||||
<ul>
|
||||
|
@ -658,6 +663,11 @@
|
|||
>https://github.com/denoland/deno</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/pyenv/pyenv"
|
||||
>https://github.com/pyenv/pyenv</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/pypa/pipx">https://github.com/pypa/pipx</a>
|
||||
</li>
|
||||
|
|
|
@ -111,6 +111,7 @@ Memory
|
|||
- https://github.com/zed-industries/zed
|
||||
- https://github.com/lwouis/alt-tab-macos
|
||||
- https://github.com/pqrs-org/Karabiner-Elements
|
||||
- https://github.com/crystalidea/macs-fan-control
|
||||
|
||||
Memory
|
||||
|
||||
|
@ -131,6 +132,7 @@ Memory
|
|||
- https://github.com/Schniz/fnm
|
||||
- https://github.com/oven-sh/bun
|
||||
- https://github.com/denoland/deno
|
||||
- https://github.com/pyenv/pyenv
|
||||
- https://github.com/pypa/pipx
|
||||
- https://github.com/astral-sh/uv
|
||||
- https://github.com/corbindavenport/nexus-tools
|
||||
|
|
Loading…
Reference in New Issue