<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go on Brian Faust</title><link>https://wimdy.works/tags/go/</link><description>Recent content in Go on Brian Faust</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://wimdy.works/tags/go/rss.xml" rel="self" type="application/rss+xml"/><item><title>Testing the Go Port Against PHP</title><link>https://wimdy.works/thoughts/make-cross-language-checks-explain-their-differences/</link><pubDate>Fri, 23 Oct 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/make-cross-language-checks-explain-their-differences/</guid><description>&lt;p&gt;A Go function can return the same failure code as the PHP function and still
behave differently in the application. Laravel might replace the exception
before the PHP resolver sees it. A database reader might fail while loading a
relationship that a direct unit test supplied as an already populated struct.
Neither difference appears in a test which compares only the final price.&lt;/p&gt;
&lt;p&gt;The rating engine&amp;rsquo;s migration checks therefore needed more than translated
assertions. They needed executable observations from PHP, a clear point at
which to compare them with Go, and enough detail to explain a disagreement.
Otherwise, “the implementations match” could mean little more than “both tests
contain the same assumption.”&lt;/p&gt;</description></item><item><title>Retire the Browser, Keep the Test Runner</title><link>https://wimdy.works/thoughts/retire-the-browser-keep-the-test-runner/</link><pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/retire-the-browser-keep-the-test-runner/</guid><description>&lt;p&gt;The Go port deliberately dropped the browser UI. The API tester was the awkward
exception: not its pages, but the program behind them. It could create a test
configuration, publish it, make real API calls, extract identifiers, wait for a
result and clean up afterward. Deleting its screen was straightforward.
Deleting all of that would have thrown away a useful part of the migration.&lt;/p&gt;
&lt;p&gt;Replacing it with a CLI also exposed distinctions the screen could make easy
to overlook. An HTTP 200 response could mean a failed test step. A failed run
could still be a successfully produced command result. A saved step record
didn&amp;rsquo;t mean its API call would never execute again. Those weren&amp;rsquo;t reasons to
redesign the tester during the port; they were behavior to understand before
moving its entry point.&lt;/p&gt;</description></item><item><title>A Rewrite Can Change Data Without Changing the Price</title><link>https://wimdy.works/thoughts/a-rewrite-can-change-data-without-changing-the-price/</link><pubDate>Thu, 01 Oct 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/a-rewrite-can-change-data-without-changing-the-price/</guid><description>&lt;p&gt;The Go history append preserved the existing JSON. That looked reasonable:
read a stored transition list, add the new transition, leave everything else
alone. Unfortunately, leaving everything else alone wasn&amp;rsquo;t what the PHP
implementation did.&lt;/p&gt;
&lt;p&gt;The shared idempotency updater in my rating engine read history through an
Eloquent array cast, appended a transition, and assigned the resulting value
back to the model. That round trip could turn an old nested &lt;code&gt;{}&lt;/code&gt; into &lt;code&gt;[]&lt;/code&gt;.
The Go translation preserved &lt;code&gt;{}&lt;/code&gt; instead. Both could complete the operation
and return the same price while storing different histories.&lt;/p&gt;</description></item><item><title>A PHP Test File Isn't One Migration Case</title><link>https://wimdy.works/thoughts/a-php-test-file-isnt-one-migration-case/</link><pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/a-php-test-file-isnt-one-migration-case/</guid><description>&lt;p&gt;One PHP file contained two test bodies and eleven migration cases. Counting
it as one file would hide ten of them. Counting its two &lt;code&gt;it(...)&lt;/code&gt; declarations
would still miss most of the work. Copying the first assertion into a Go test
would look plausible and preserve almost nothing of the original matrix.&lt;/p&gt;
&lt;p&gt;The file covered customer lifecycle states in the pricing application. One
body tested eight transitions; another tested three sets of state predicates.
It was small enough to follow completely, which makes it a useful way into
the much larger problem: using an existing PHP suite to constrain a Go port
without pretending that translating test syntax proves equivalent behavior.&lt;/p&gt;</description></item><item><title>When the Framework Sets the Latency Floor</title><link>https://wimdy.works/thoughts/when-the-framework-sets-the-latency-floor/</link><pubDate>Sat, 01 Aug 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/when-the-framework-sets-the-latency-floor/</guid><description>&lt;p&gt;By the time I considered moving the pricing backend to Go, the PHP version
already had table-driven pricing, prepared runtime projections, candidate
indexes, and substantial cache work. Those changes mattered. They didn&amp;rsquo;t
remove the request cost I was still seeing before business processing:
roughly 50–100 milliseconds on the conventional PHP/Laravel path, reduced to
roughly 30–40 milliseconds with Octane in the setup I tested.&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t want to spend the rest of the project squeezing a little more out
of that same path. Go was a better fit for the request and computation work,
particularly as the pricing datasets grew. Performance, resource consumption,
and stability drove the choice. The interesting engineering question became
how to replace the runtime without quietly replacing the application too.&lt;/p&gt;</description></item></channel></rss>