Alice52/tutorials

[language] compare

Alice52 opened this issue · 1 comments

kotlin

golang

java

rust

golang blemish

  1. without syntax annotation
  2. without aop/validate
  3. without named function and default args
  4. without agent enhance
  5. slice 越界会导致 panic,而不能直接将其转换为 error
    func RecoveryPanicAsError(err error) {
        defer func() {
    	    if r := recover(); r != nil {
    		    err = errors.New(fmt.Sprintf("recovered from panic: %v", r))
    	    }
        }()
    }