Coder Social home page Coder Social logo

go-bridge's Introduction

go-bridge

Bridge for @vercel/go.

Usage

package main

import (
	"net/http"
	bridge "github.com/vercel/go-bridge/go/bridge"
)

func main() {
	bridge.Start(http.HandlerFunc(__NOW_HANDLER_FUNC_NAME))
}

See PR 3976 to see why this repo exists.

go-bridge's People

Contributors

endangeredmassa avatar joecohens avatar styfle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-bridge's Issues

I encounted the error "*bridge.ResponseWriter is not http.Flusher: missing method Flush"

I use gin framework and call gin.Context.Writer.Flush method. Yesterday the flush run well, but today it throws below error:

[31m2023/06/23 06:50:16 [Recovery] 2023/06/23 - 06:50:16 panic recovered:
interface conversion: *bridge.ResponseWriter is not http.Flusher: missing method Flush
/vercel/path0/.vercel/cache/golang/src/runtime/iface.go:92 (0x40c364)
/vercel/path0/.vercel/cache/golang/src/runtime/iface.go:429 (0x40d1dc)
/vercel/go/pkg/mod/github.com/gin-gonic/[email protected]/response_writer.go:123 (0xa70a18)
/vercel/path0/api/handler.go:328 (0xa7b3af)

Is this error related to the change of golang runtime? Or maybe it's better to add a Flush implementation in bridge.ResponseWriter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.