autotrailingslash

package
v3.16.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 4 Imported by: 0

README

AutoTrailingSlash Plugin

The autotrailingslash plugin is a Goa v3 plugin that makes it possible to handle HTTP requests with a trailing slash.

Goa v3 switched the default HTTP router to chi in v3.13.0. Due to that change, requests with a trailing slash are no longer handled as same as v3.12.4 or earier. This plugin reproduces the previous httptreemux-like behavior.

Enabling the Plugin

To enable the plugin simply import as follows:

import (
  _ "github.com/tchssk/goaplugins/v3/autotrailingslash"
  . "goa.design/goa/v3/dsl"
)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error)

func Prepare

func Prepare(genpkg string, roots []eval.Root) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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