summaryrefslogtreecommitdiff
tag namev0.60.0 (ad67e950933556fd49829b779d1689bca49ffd70)
tag date2025-02-01 08:16:59 +0700
tagged byShulhan <ms@kilabit.info>
tagged objectcommit 8f9482cfe1...
downloadpakakeh.go-0.60.0.tar.xz
Release pakakeh.go v0.60.0 (2025-02-01)
Some changes that affected almost all packages are * replacing "interface{}" with "any" (added since Go 1.18), * using for-range on numeric value (supported on Go 1.22). === lib/bytes [BREAKING CHANGES] We remove Copy and Concat functions in favor of standard library. Since Go 1.20, the standard bytes package have the Copy function. Since Go 1.22, the standard slices package have the Concat function. [BREAKING CHANGES] We also remove "lib/bytes.AppendXxx", "lib/bytes.ReadXxx", and "lib/bytes.WriteXxx" in favor of standard library. Since Go 1.19, package "encoding/binary" support appending byte order. The ReadXxx and WriteXxx can be replaced with standard library BigEndian/LittleEndian UintXxx and PutUintXxx. === lib/debug [BREAKING CHANGES] The global Value variable has been removed. Using global variable inside one package is a mistake. If, for example, package X set debug.Value to 1, another packages that does need to be debugged will print unnecessary log messages. === lib/dns [BUG FIX] We fix unpacking HTTPS where the response answers contains RR other than SVCB parameters, for example CNAME. [ENHANCEMENT] This release now detect invalid response header earlier, like invalid op code and response code, before we continue unpacking the rest data. Previously, we unpack the header and then question without detecting whether the header itself is valid or not. This cause the unpacking question return an error like label length overflow at index xxx One of the case is when someone sent random or HTTP request to DoT port. [ENHANCEMENT] In the logging part, we improve the logging prefix on serveTCPClient. The serveTCPClient is used to serve TCP and DoT clients. Previously, the error returned from this method is prefixed based on the kind, for example serveTCPClient TCP: ... serveTCPClient DoT: ... This changes pass the log prefix to the method so now it become serveTCPClient: ... serveDoTClient: ... === lib/http [ENHANCEMENT] On server with TryDirect is true, a GET request to a directory now always rescan the content and the generate the new "index.html". In the generated "index.html" we display the file time in UTC instead of local time. The ParseContentRange function now return an error instead of nil "*RangePosition". === lib/goanalysis [NEW FEATURE] Package goanalysis implement go static analysis using [Analyzer] that are not included in the default "go vet", but included in the [passes] directory, including: fieldalignment, nilness, reflectvaluecompare, shadow, sortslice, unusedwrite, and waitgroup. This package is not mean to be imported directly by other package except main, like we have in [cmd/gocheck]. === lib/hunspell This package has been renamed to "_hunspell". The hunspell is still in progress and we did not have time to continue it, so we rename it to "_hunspell" for now to prevent it being checked by linters or being imported. === lib/memfs [BUG FIX] Fix possible panic on AddChild if path is not included. === lib/play [ENHANCEMENT] One of the major issue that we previously have is the Run and Test functions can write file in any unsafe path. Another issue is default GoVersion and Timeout is set on the package level. This release introduce new type "Go" as the top level type that can be instantiate with different Root, GoVersion, and Timeout. The instance of Go then can Format, Run, or Test the Go code in their own scope. Any request to Run or Test Go code that requires writing new files now joined with the [GoOptions.Root] first. If the final absolute path does not have Root as the prefix it will return an error [os.ErrPermission]. This fix possible security issue where file may be written outside of the Root directory. === lib/test [ENHANCEMENT] Inside the Assert, we call the [T.Helper] method. The Helper method mark the Assert function as test helper, which when printing file and line information, the stack trace from Assert function will be skipped. This remove manual lines skipping that previously we have. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyS35x1RIQ2SkuGz5KU2C1AMnE8AUCZ513FAAKCRBKU2C1AMnE 8DLhAQDlb6uEL65mSLZlleitUkot42yrob+71ro3WyZtymKcTwD+JyiQoMS65los Jd50O/wKSPdStEDmD2NSzY3mnK1PgAs= =cm9O -----END PGP SIGNATURE-----