From 528a53f7f76f08af5902f4cfa8235380b3434ba0 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Mon, 25 Apr 2022 00:43:06 +0200 Subject: drafty types refactor with simple ascii package types.go compiles but that is about it, here be dragons. Pushing so that we can get an idea of what this refactor would roughly look like. --- pkg/types/encoding.go | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 pkg/types/encoding.go (limited to 'pkg/types/encoding.go') diff --git a/pkg/types/encoding.go b/pkg/types/encoding.go deleted file mode 100644 index 9fd2caa..0000000 --- a/pkg/types/encoding.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -import ( - "encoding/binary" -) - -// RFC4251, section 5 - -func putSSHString(b []byte, str string) int { - l := len(str) - - i := 0 - binary.BigEndian.PutUint32(b[i:i+4], uint32(l)) - i += 4 - copy(b[i:i+l], str) - i += l - - return i -} -- cgit v1.2.3