Categorygithub.com/genert/urlvalueparser
modulepackage
0.0.0-20190516094004-49f8d8b9bf88
Repository: https://github.com/genert/urlvalueparser.git
Documentation: pkg.go.dev

# README

URL value parser

License

Tool that lets you extract values from URL paths, leaving the other parts untouched.

Features

By default, the following chunks are consider values that will be replaced:

  • Decimal numbers
  • Strings in UUID format.

    Both the standard UUID forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the Microsoft encoding {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} and the raw hex encoding: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

  • Email
  • Data URI
  • IPV4 and IPV6
  • Semver
  • Ethereum address
  • JWT token

Usage

ReplacePathValues(path: String, replacement: String): String

import "github.com/genert/urlvalueparser"

result := urlvalueparser.ReplacePathValues("/legit/path/123/user", ":id")

// Following will be printed: /legit/path/:id/user
fmt.Println(result)

# Functions

No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author