mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-16 12:44:33 +00:00
16 lines
287 B
Go
Executable File
16 lines
287 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/url"
|
|
)
|
|
|
|
// Shortens a destination URL and returns a full short URL.
|
|
func ShortenAlongUrl() {
|
|
urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := urlService.Shorten(&url.ShortenRequest{})
|
|
fmt.Println(rsp, err)
|
|
}
|