# tailor **Repository Path**: wandercn/tailor ## Basic Information - **Project Name**: tailor - **Description**: tailor returns only the map of the specified keys - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-07 - **Last Updated**: 2022-07-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### tailor tailor returns only the map of the specified keys #### install ``` go get github.com/wandercn/tailor ``` #### example ``` package main import ( "fmt" "github.com/wandercn/tailor" ) func main() { doc := tailor.Object{ "A": 1, "B": tailor.Object{ "age": 20}, "C": "c", "D": 0.99, } fmt.Printf("before: %v\n", doc) keys := []string{"C", "D"} result := tailor.ClipOne(keys, doc) fmt.Printf("after: %v\n", result) } ``` #### result ``` before: map[A:1 B:map[age:20] C:c D:0.99] after: map[C:c D:0.99] ```