Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gin-gonic/gin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: opentoys/gin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 2 commits
  • 75 files changed
  • 1 contributor

Commits on Feb 6, 2024

  1. Copy the full SHA
    67e6cc4 View commit details
  2. Copy the full SHA
    3177c98 View commit details
Showing with 114 additions and 12,624 deletions.
  1. +0 −49 .github/ISSUE_TEMPLATE.md
  2. +0 −7 .github/PULL_REQUEST_TEMPLATE.md
  3. +0 −10 .github/dependabot.yml
  4. +0 −49 .github/workflows/codeql.yml
  5. +0 −78 .github/workflows/gin.yml
  6. +0 −33 .github/workflows/goreleaser.yml
  7. +2 −0 README.md
  8. +0 −139 auth_test.go
  9. +0 −160 benchmarks_test.go
  10. +6 −21 binding/binding.go
  11. +0 −57 binding/binding_msgpack_test.go
  12. +0 −115 binding/binding_nomsgpack.go
  13. +0 −1,371 binding/binding_test.go
  14. +84 −84 binding/default_validator.go
  15. +0 −24 binding/default_validator_benchmark_test.go
  16. +0 −88 binding/default_validator_test.go
  17. +3 −3 binding/form.go
  18. +0 −67 binding/form_mapping_benchmark_test.go
  19. +0 −325 binding/form_mapping_test.go
  20. +1 −1 binding/header.go
  21. +1 −1 binding/json.go
  22. +0 −30 binding/json_test.go
  23. +0 −37 binding/msgpack.go
  24. +0 −34 binding/msgpack_test.go
  25. +0 −138 binding/multipart_form_mapping_test.go
  26. +0 −41 binding/protobuf.go
  27. +1 −1 binding/query.go
  28. +0 −35 binding/toml.go
  29. +0 −22 binding/toml_test.go
  30. +1 −1 binding/uri.go
  31. +0 −228 binding/validate_test.go
  32. +1 −1 binding/xml.go
  33. +0 −25 binding/xml_test.go
  34. +0 −35 binding/yaml.go
  35. +0 −21 binding/yaml_test.go
  36. +11 −52 context.go
  37. +0 −37 context_1.18_test.go
  38. +0 −30 context_1.19_test.go
  39. +0 −11 context_appengine.go
  40. +0 −2,447 context_test.go
  41. +0 −166 debug_test.go
  42. +0 −33 deprecated_test.go
  43. +0 −128 errors_test.go
  44. +1 −8 gin.go
  45. +0 −17 ginS/README.md
  46. +0 −160 ginS/gins.go
  47. +0 −563 gin_integration_test.go
  48. +0 −698 gin_test.go
  49. +0 −474 githubapi_test.go
  50. +0 −34 go.mod
  51. +0 −85 go.sum
  52. +0 −22 internal/json/go_json.go
  53. +0 −2 internal/json/json.go
  54. +0 −23 internal/json/jsoniter.go
  55. +0 −23 internal/json/sonic.go
  56. +1 −4 logger.go
  57. +0 −456 logger_test.go
  58. +0 −253 middleware_test.go
  59. +1 −1 mode.go
  60. +0 −69 mode_test.go
  61. +0 −140 path_test.go
  62. +0 −248 recovery_test.go
  63. +0 −43 render/msgpack.go
  64. +0 −36 render/protobuf.go
  65. +0 −23 render/reader_test.go
  66. +0 −3 render/render.go
  67. +0 −43 render/render_msgpack_test.go
  68. +0 −593 render/render_test.go
  69. +0 −36 render/toml.go
  70. +0 −36 render/yaml.go
  71. +0 −188 response_writer_test.go
  72. +0 −195 routergroup_test.go
  73. +0 −790 routes_test.go
  74. +0 −973 tree_test.go
  75. +0 −150 utils_test.go
49 changes: 0 additions & 49 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

7 changes: 0 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/dependabot.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/codeql.yml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/gin.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/goreleaser.yml

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Gin Web Framework

## Frok and remove relation. Only relation std

<img align="right" width="159px" src="https://raw.githubusercontent.com/gin-gonic/logo/master/color.png">

[![Build Status](https://github.com/gin-gonic/gin/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/gin-gonic/gin/actions?query=branch%3Amaster)
139 changes: 0 additions & 139 deletions auth_test.go

This file was deleted.

160 changes: 0 additions & 160 deletions benchmarks_test.go

This file was deleted.

27 changes: 6 additions & 21 deletions binding/binding.go
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

//go:build !nomsgpack

package binding

import "net/http"
import (
"net/http"
)

// Content-Type MIME of the most common data formats.
const (
@@ -67,7 +67,7 @@ type StructValidator interface {
// Validator is the default validator which implements the StructValidator
// interface. It uses https://github.com/go-playground/validator/tree/v10.6.1
// under the hood.
var Validator StructValidator = &defaultValidator{}
var Validator = true

// These implement the Binding interface and can be used to bind the data
// present in the request to struct instances.
@@ -78,12 +78,8 @@ var (
Query = queryBinding{}
FormPost = formPostBinding{}
FormMultipart = formMultipartBinding{}
ProtoBuf = protobufBinding{}
MsgPack = msgpackBinding{}
YAML = yamlBinding{}
Uri = uriBinding{}
Header = headerBinding{}
TOML = tomlBinding{}
)

// Default returns the appropriate Binding instance based on the HTTP method
@@ -98,24 +94,13 @@ func Default(method, contentType string) Binding {
return JSON
case MIMEXML, MIMEXML2:
return XML
case MIMEPROTOBUF:
return ProtoBuf
case MIMEMSGPACK, MIMEMSGPACK2:
return MsgPack
case MIMEYAML:
return YAML
case MIMETOML:
return TOML
case MIMEMultipartPOSTForm:
return FormMultipart
default: // case MIMEPOSTForm:
return Form
}
}

func validate(obj any) error {
if Validator == nil {
return nil
}
return Validator.ValidateStruct(obj)
var Validate = func(v any) error {
return nil
}
57 changes: 0 additions & 57 deletions binding/binding_msgpack_test.go

This file was deleted.

115 changes: 0 additions & 115 deletions binding/binding_nomsgpack.go

This file was deleted.

1,371 changes: 0 additions & 1,371 deletions binding/binding_test.go

This file was deleted.

168 changes: 84 additions & 84 deletions binding/default_validator.go
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
// Copyright 2017 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
// // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
// // Use of this source code is governed by a MIT style
// // license that can be found in the LICENSE file.

package binding

import (
"fmt"
"reflect"
"strings"
"sync"
// import (
// "fmt"
// "reflect"
// "strings"
// "sync"

"github.com/go-playground/validator/v10"
)
// "github.com/go-playground/validator/v10"
// )

type defaultValidator struct {
once sync.Once
validate *validator.Validate
}
// type defaultValidator struct {
// once sync.Once
// validate *validator.Validate
// }

type SliceValidationError []error
// type SliceValidationError []error

// Error concatenates all error elements in SliceValidationError into a single string separated by \n.
func (err SliceValidationError) Error() string {
n := len(err)
switch n {
case 0:
return ""
default:
var b strings.Builder
if err[0] != nil {
fmt.Fprintf(&b, "[%d]: %s", 0, err[0].Error())
}
if n > 1 {
for i := 1; i < n; i++ {
if err[i] != nil {
b.WriteString("\n")
fmt.Fprintf(&b, "[%d]: %s", i, err[i].Error())
}
}
}
return b.String()
}
}
// // Error concatenates all error elements in SliceValidationError into a single string separated by \n.
// func (err SliceValidationError) Error() string {
// n := len(err)
// switch n {
// case 0:
// return ""
// default:
// var b strings.Builder
// if err[0] != nil {
// fmt.Fprintf(&b, "[%d]: %s", 0, err[0].Error())
// }
// if n > 1 {
// for i := 1; i < n; i++ {
// if err[i] != nil {
// b.WriteString("\n")
// fmt.Fprintf(&b, "[%d]: %s", i, err[i].Error())
// }
// }
// }
// return b.String()
// }
// }

var _ StructValidator = (*defaultValidator)(nil)
// var _ StructValidator = (*defaultValidator)(nil)

// ValidateStruct receives any kind of type, but only performed struct or pointer to struct type.
func (v *defaultValidator) ValidateStruct(obj any) error {
if obj == nil {
return nil
}
// // ValidateStruct receives any kind of type, but only performed struct or pointer to struct type.
// func (v *defaultValidator) ValidateStruct(obj any) error {
// if obj == nil {
// return nil
// }

value := reflect.ValueOf(obj)
switch value.Kind() {
case reflect.Ptr:
return v.ValidateStruct(value.Elem().Interface())
case reflect.Struct:
return v.validateStruct(obj)
case reflect.Slice, reflect.Array:
count := value.Len()
validateRet := make(SliceValidationError, 0)
for i := 0; i < count; i++ {
if err := v.ValidateStruct(value.Index(i).Interface()); err != nil {
validateRet = append(validateRet, err)
}
}
if len(validateRet) == 0 {
return nil
}
return validateRet
default:
return nil
}
}
// value := reflect.ValueOf(obj)
// switch value.Kind() {
// case reflect.Ptr:
// return v.ValidateStruct(value.Elem().Interface())
// case reflect.Struct:
// return v.validateStruct(obj)
// case reflect.Slice, reflect.Array:
// count := value.Len()
// validateRet := make(SliceValidationError, 0)
// for i := 0; i < count; i++ {
// if err := v.ValidateStruct(value.Index(i).Interface()); err != nil {
// validateRet = append(validateRet, err)
// }
// }
// if len(validateRet) == 0 {
// return nil
// }
// return validateRet
// default:
// return nil
// }
// }

// validateStruct receives struct type
func (v *defaultValidator) validateStruct(obj any) error {
v.lazyinit()
return v.validate.Struct(obj)
}
// // validateStruct receives struct type
// func (v *defaultValidator) validateStruct(obj any) error {
// v.lazyinit()
// return v.validate.Struct(obj)
// }

// Engine returns the underlying validator engine which powers the default
// Validator instance. This is useful if you want to register custom validations
// or struct level validations. See validator GoDoc for more info -
// https://pkg.go.dev/github.com/go-playground/validator/v10
func (v *defaultValidator) Engine() any {
v.lazyinit()
return v.validate
}
// // Engine returns the underlying validator engine which powers the default
// // Validator instance. This is useful if you want to register custom validations
// // or struct level validations. See validator GoDoc for more info -
// // https://pkg.go.dev/github.com/go-playground/validator/v10
// func (v *defaultValidator) Engine() any {
// v.lazyinit()
// return v.validate
// }

func (v *defaultValidator) lazyinit() {
v.once.Do(func() {
v.validate = validator.New()
v.validate.SetTagName("binding")
})
}
// func (v *defaultValidator) lazyinit() {
// v.once.Do(func() {
// v.validate = validator.New()
// v.validate.SetTagName("binding")
// })
// }
24 changes: 0 additions & 24 deletions binding/default_validator_benchmark_test.go

This file was deleted.

88 changes: 0 additions & 88 deletions binding/default_validator_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions binding/form.go
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ func (formBinding) Bind(req *http.Request, obj any) error {
if err := mapForm(obj, req.Form); err != nil {
return err
}
return validate(obj)
return Validate(obj)
}

func (formPostBinding) Name() string {
@@ -43,7 +43,7 @@ func (formPostBinding) Bind(req *http.Request, obj any) error {
if err := mapForm(obj, req.PostForm); err != nil {
return err
}
return validate(obj)
return Validate(obj)
}

func (formMultipartBinding) Name() string {
@@ -58,5 +58,5 @@ func (formMultipartBinding) Bind(req *http.Request, obj any) error {
return err
}

return validate(obj)
return Validate(obj)
}
67 changes: 0 additions & 67 deletions binding/form_mapping_benchmark_test.go

This file was deleted.

325 changes: 0 additions & 325 deletions binding/form_mapping_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion binding/header.go
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ func (headerBinding) Bind(req *http.Request, obj any) error {
return err
}

return validate(obj)
return Validate(obj)
}

func mapHeader(ptr any, h map[string][]string) error {
2 changes: 1 addition & 1 deletion binding/json.go
Original file line number Diff line number Diff line change
@@ -52,5 +52,5 @@ func decodeJSON(r io.Reader, obj any) error {
if err := decoder.Decode(obj); err != nil {
return err
}
return validate(obj)
return Validate(obj)
}
30 changes: 0 additions & 30 deletions binding/json_test.go

This file was deleted.

37 changes: 0 additions & 37 deletions binding/msgpack.go

This file was deleted.

34 changes: 0 additions & 34 deletions binding/msgpack_test.go

This file was deleted.

138 changes: 0 additions & 138 deletions binding/multipart_form_mapping_test.go

This file was deleted.

41 changes: 0 additions & 41 deletions binding/protobuf.go

This file was deleted.

2 changes: 1 addition & 1 deletion binding/query.go
Original file line number Diff line number Diff line change
@@ -17,5 +17,5 @@ func (queryBinding) Bind(req *http.Request, obj any) error {
if err := mapForm(obj, values); err != nil {
return err
}
return validate(obj)
return Validate(obj)
}
35 changes: 0 additions & 35 deletions binding/toml.go

This file was deleted.

22 changes: 0 additions & 22 deletions binding/toml_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion binding/uri.go
Original file line number Diff line number Diff line change
@@ -14,5 +14,5 @@ func (uriBinding) BindUri(m map[string][]string, obj any) error {
if err := mapURI(obj, m); err != nil {
return err
}
return validate(obj)
return Validate(obj)
}
228 changes: 0 additions & 228 deletions binding/validate_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion binding/xml.go
Original file line number Diff line number Diff line change
@@ -29,5 +29,5 @@ func decodeXML(r io.Reader, obj any) error {
if err := decoder.Decode(obj); err != nil {
return err
}
return validate(obj)
return Validate(obj)
}
25 changes: 0 additions & 25 deletions binding/xml_test.go

This file was deleted.

35 changes: 0 additions & 35 deletions binding/yaml.go

This file was deleted.

21 changes: 0 additions & 21 deletions binding/yaml_test.go

This file was deleted.

63 changes: 11 additions & 52 deletions context.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ import (
"sync"
"time"

"github.com/gin-contrib/sse"
"github.com/gin-gonic/gin/binding"
"github.com/gin-gonic/gin/render"
)
@@ -646,16 +645,6 @@ func (c *Context) BindQuery(obj any) error {
return c.MustBindWith(obj, binding.Query)
}

// BindYAML is a shortcut for c.MustBindWith(obj, binding.YAML).
func (c *Context) BindYAML(obj any) error {
return c.MustBindWith(obj, binding.YAML)
}

// BindTOML is a shortcut for c.MustBindWith(obj, binding.TOML).
func (c *Context) BindTOML(obj any) error {
return c.MustBindWith(obj, binding.TOML)
}

// BindHeader is a shortcut for c.MustBindWith(obj, binding.Header).
func (c *Context) BindHeader(obj any) error {
return c.MustBindWith(obj, binding.Header)
@@ -711,16 +700,6 @@ func (c *Context) ShouldBindQuery(obj any) error {
return c.ShouldBindWith(obj, binding.Query)
}

// ShouldBindYAML is a shortcut for c.ShouldBindWith(obj, binding.YAML).
func (c *Context) ShouldBindYAML(obj any) error {
return c.ShouldBindWith(obj, binding.YAML)
}

// ShouldBindTOML is a shortcut for c.ShouldBindWith(obj, binding.TOML).
func (c *Context) ShouldBindTOML(obj any) error {
return c.ShouldBindWith(obj, binding.TOML)
}

// ShouldBindHeader is a shortcut for c.ShouldBindWith(obj, binding.Header).
func (c *Context) ShouldBindHeader(obj any) error {
return c.ShouldBindWith(obj, binding.Header)
@@ -866,6 +845,17 @@ func (c *Context) Header(key, value string) {
c.Writer.Header().Set(key, value)
}

// GetHeader returns value from request headers.
func (s *Context) GetIP() (ip string) {
if ip = s.GetHeader("X-Real-IP"); ip != "" {
return
}
if ip = s.GetHeader("x-forwarded-for"); ip != "" {
return
}
return s.Request.RemoteAddr
}

// GetHeader returns value from request headers.
func (c *Context) GetHeader(key string) string {
return c.requestHeader(key)
@@ -989,21 +979,6 @@ func (c *Context) XML(code int, obj any) {
c.Render(code, render.XML{Data: obj})
}

// YAML serializes the given struct as YAML into the response body.
func (c *Context) YAML(code int, obj any) {
c.Render(code, render.YAML{Data: obj})
}

// TOML serializes the given struct as TOML into the response body.
func (c *Context) TOML(code int, obj any) {
c.Render(code, render.TOML{Data: obj})
}

// ProtoBuf serializes the given struct as ProtoBuf into the response body.
func (c *Context) ProtoBuf(code int, obj any) {
c.Render(code, render.ProtoBuf{Data: obj})
}

// String writes the given string into the response body.
func (c *Context) String(code int, format string, values ...any) {
c.Render(code, render.String{Format: format, Data: values})
@@ -1069,14 +1044,6 @@ func (c *Context) FileAttachment(filepath, filename string) {
http.ServeFile(c.Writer, c.Request, filepath)
}

// SSEvent writes a Server-Sent Event into the body stream.
func (c *Context) SSEvent(name string, message any) {
c.Render(-1, sse.Event{
Event: name,
Data: message,
})
}

// Stream sends a streaming response and returns a boolean
// indicates "Is client disconnected in middle of stream"
func (c *Context) Stream(step func(w io.Writer) bool) bool {
@@ -1127,14 +1094,6 @@ func (c *Context) Negotiate(code int, config Negotiate) {
data := chooseData(config.XMLData, config.Data)
c.XML(code, data)

case binding.MIMEYAML:
data := chooseData(config.YAMLData, config.Data)
c.YAML(code, data)

case binding.MIMETOML:
data := chooseData(config.TOMLData, config.Data)
c.TOML(code, data)

default:
c.AbortWithError(http.StatusNotAcceptable, errors.New("the accepted formats are not offered by the server")) //nolint: errcheck
}
37 changes: 0 additions & 37 deletions context_1.18_test.go

This file was deleted.

30 changes: 0 additions & 30 deletions context_1.19_test.go

This file was deleted.

11 changes: 0 additions & 11 deletions context_appengine.go

This file was deleted.

2,447 changes: 0 additions & 2,447 deletions context_test.go

This file was deleted.

166 changes: 0 additions & 166 deletions debug_test.go

This file was deleted.

33 changes: 0 additions & 33 deletions deprecated_test.go

This file was deleted.

128 changes: 0 additions & 128 deletions errors_test.go

This file was deleted.

9 changes: 1 addition & 8 deletions gin.go
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ import (

"github.com/gin-gonic/gin/internal/bytesconv"
"github.com/gin-gonic/gin/render"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
)

const defaultMultipartMemory = 32 << 20 // 32 MB
@@ -221,12 +219,7 @@ func Default() *Engine {
}

func (engine *Engine) Handler() http.Handler {
if !engine.UseH2C {
return engine
}

h2s := &http2.Server{}
return h2c.NewHandler(engine, h2s)
return engine
}

func (engine *Engine) allocateContext(maxParams uint16) *Context {
17 changes: 0 additions & 17 deletions ginS/README.md

This file was deleted.

160 changes: 0 additions & 160 deletions ginS/gins.go

This file was deleted.

563 changes: 0 additions & 563 deletions gin_integration_test.go

This file was deleted.

698 changes: 0 additions & 698 deletions gin_test.go

This file was deleted.

474 changes: 0 additions & 474 deletions githubapi_test.go

This file was deleted.

34 changes: 0 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
module github.com/gin-gonic/gin

go 1.20

require (
github.com/bytedance/sonic v1.10.2
github.com/gin-contrib/sse v0.1.0
github.com/go-playground/validator/v10 v10.17.0
github.com/goccy/go-json v0.10.2
github.com/json-iterator/go v1.1.12
github.com/mattn/go-isatty v0.0.20
github.com/pelletier/go-toml/v2 v2.1.1
github.com/stretchr/testify v1.8.4
github.com/ugorji/go/codec v1.2.12
golang.org/x/net v0.20.0
google.golang.org/protobuf v1.32.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/leodido/go-urn v1.3.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
)
85 changes: 0 additions & 85 deletions go.sum

This file was deleted.

22 changes: 0 additions & 22 deletions internal/json/go_json.go

This file was deleted.

2 changes: 0 additions & 2 deletions internal/json/json.go
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

//go:build !jsoniter && !go_json && !(sonic && avx && (linux || windows || darwin) && amd64)

package json

import "encoding/json"
23 changes: 0 additions & 23 deletions internal/json/jsoniter.go

This file was deleted.

23 changes: 0 additions & 23 deletions internal/json/sonic.go

This file was deleted.

5 changes: 1 addition & 4 deletions logger.go
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@ import (
"net/http"
"os"
"time"

"github.com/mattn/go-isatty"
)

type consoleColorModeValue int
@@ -224,8 +222,7 @@ func LoggerWithConfig(conf LoggerConfig) HandlerFunc {

isTerm := true

if w, ok := out.(*os.File); !ok || os.Getenv("TERM") == "dumb" ||
(!isatty.IsTerminal(w.Fd()) && !isatty.IsCygwinTerminal(w.Fd())) {
if os.Getenv("TERM") == "dumb" {
isTerm = false
}

Loading