stretchr / sdk-go

Go SDK for Stretchr platform
7 stars 1 forks source link

Add `stretchr.Path` helper #20

Closed matryer closed 11 years ago

matryer commented 11 years ago

The Path helper would just blend all arguments into a path, separated by /.

stretchr.Path("people", "123", "books")
//= "people/123/books"

Should also work with arrays:

personSegs := []string{"people", "123"}
stretchr.Path(personSegs, "books", "456")
//= "people/123/books/456"