Skip to content

Commit ddc8f17

Browse files
kvzclaude
andcommitted
feat: add Go parity verification (20/20 functions pass)
- Add golang.ts parity handler with JS→Go translation - Register golang handler in parity test index - Add verified: 1.23 headers to all 20 Go functions - Fix Count.js discuss URL (was pointing to php/printf) Functions verified against golang:1.23 Docker image: - strconv: Atoi, FormatBool, FormatInt, Itoa, ParseBool, ParseInt - strings: Contains, Count, HasPrefix, HasSuffix, Index, Join, LastIndex, Repeat, Replace, Split, ToLower, ToUpper, Trim, TrimSpace 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6d74bec commit ddc8f17

File tree

22 files changed

+227
-1
lines changed

22 files changed

+227
-1
lines changed

src/golang/strconv/Atoi.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function Atoi(s) {
22
// discuss at: https://locutus.io/golang/strconv/Atoi
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// note 1: Parses a decimal string and returns the integer value.
56
// note 1: Returns [value, null] on success, [0, error] on failure.

src/golang/strconv/FormatBool.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function FormatBool(b) {
22
// discuss at: https://locutus.io/golang/strconv/FormatBool
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// note 1: Returns "true" or "false" according to the value of b.
56
// example 1: FormatBool(true)

src/golang/strconv/FormatInt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function FormatInt(i, base) {
22
// discuss at: https://locutus.io/golang/strconv/FormatInt
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// note 1: Returns the string representation of i in the given base (2 to 36).
56
// example 1: FormatInt(42, 10)

src/golang/strconv/Itoa.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function Itoa(i) {
22
// discuss at: https://locutus.io/golang/strconv/Itoa
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// note 1: Converts an integer to its decimal string representation.
56
// example 1: Itoa(42)

src/golang/strconv/ParseBool.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function ParseBool(str) {
22
// discuss at: https://locutus.io/golang/strconv/ParseBool
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// note 1: Parses a boolean string value.
56
// note 1: Returns [value, null] on success, [false, error] on failure.

src/golang/strconv/ParseInt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function ParseInt(s, base, bitSize) {
22
// discuss at: https://locutus.io/golang/strconv/ParseInt
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// note 1: Interprets a string s in the given base (0, 2 to 36).
56
// note 1: Returns [value, null] on success, [0, error] on failure.

src/golang/strings/Contains.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function Contains(s, substr) {
22
// discuss at: https://locutus.io/golang/strings/Contains
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// example 1: Contains('Kevin', 'K')
56
// returns 1: true

src/golang/strings/Count.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function Count(s, sep) {
2-
// discuss at: https://locutus.io/php/printf/
2+
// discuss at: https://locutus.io/golang/strings/Count
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// input by: GopherJS (https://www.gopherjs.org/)
56
// example 1: Count("cheese", "e")

src/golang/strings/HasPrefix.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function HasPrefix(s, prefix) {
22
// discuss at: https://locutus.io/golang/strings/HasPrefix
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// example 1: HasPrefix('Gopher', 'Go')
56
// returns 1: true

src/golang/strings/HasSuffix.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = function HasSuffix(s, suffix) {
22
// discuss at: https://locutus.io/golang/strings/HasSuffix
3+
// verified: 1.23
34
// original by: Kevin van Zonneveld (https://kvz.io)
45
// example 1: HasSuffix('Amigo', 'go')
56
// returns 1: true

0 commit comments

Comments
 (0)