migrate-from-beego

command
v1.36.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

migrate-from-beego example — beego → zip migration via http.Handler adapter. beego.BeeApp exposes Handlers as an http.Handler-compatible surface; the same AdaptNetHTTP adapter that fronted chi handles beego too.

In a real port:

import (
    "github.com/beego/beego/v2/server/web"
    "github.com/zap-proto/zip"
)

beeApp := web.NewHttpSever()  // your existing beego app
zipApp := zip.New(zip.Config{AppName: "iam"})
zipApp.Group("/legacy/iam").All("/*", zip.AdaptNetHTTP(beeApp.Handlers))

This example uses a stand-in http.Handler so the file builds without pulling beego — same adapter pattern in either case.

The adapted subtree is a wildcard route and registers no operation, so nothing behind /legacy/iam is in the OpenAPI document, the MCP tool list, the CLI or the call plane. New work goes in as a TYPED op, and a native route added later wins by specificity — so the legacy tree shrinks one op at a time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL