Rename Append to Merge, replace strings_Join with slice_Join, and auto-detect non-TTY output

- Rename Append to Merge on Cookies, Headers, and Params types and simplify Parse to use direct append
- Replace strings_Join(sep, ...values) with slice_Join(slice, sep) for consistency with slice-based template functions
- Auto-enable quiet mode when stdout is not a terminal
- Remove ErrCLINoArgs check to allow running sarin without arguments
- Add -it flag to Docker examples in docs
This commit is contained in:
2026-02-15 02:56:32 +04:00
parent a3e20cd3d3
commit d346067e8a
10 changed files with 23 additions and 37 deletions

View File

@@ -15,7 +15,7 @@ func (cookies Cookies) GetValue(key string) *[]string {
return nil
}
func (cookies *Cookies) Append(cookie ...Cookie) {
func (cookies *Cookies) Merge(cookie ...Cookie) {
for _, c := range cookie {
if item := cookies.GetValue(c.Key); item != nil {
*item = append(*item, c.Value...)
@@ -27,7 +27,7 @@ func (cookies *Cookies) Append(cookie ...Cookie) {
func (cookies *Cookies) Parse(rawValues ...string) {
for _, rawValue := range rawValues {
cookies.Append(*ParseCookie(rawValue))
*cookies = append(*cookies, *ParseCookie(rawValue))
}
}