{"id":17683050,"url":"https://github.com/shomali11/proper","last_synced_at":"2025-05-12T23:51:31.678Z","repository":{"id":57484305,"uuid":"93804136","full_name":"shomali11/proper","owner":"shomali11","description":"A string map decorator","archived":false,"fork":false,"pushed_at":"2019-06-08T03:25:32.000Z","size":61,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T03:49:07.662Z","etag":null,"topics":["map","parameter","parameters","properties","property","string"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shomali11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-09T00:52:28.000Z","updated_at":"2022-05-11T14:54:24.000Z","dependencies_parsed_at":"2022-08-26T14:20:55.599Z","dependency_job_id":null,"html_url":"https://github.com/shomali11/proper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shomali11%2Fproper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shomali11%2Fproper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shomali11%2Fproper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shomali11%2Fproper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shomali11","download_url":"https://codeload.github.com/shomali11/proper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843168,"owners_count":21972869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["map","parameter","parameters","properties","property","string"],"created_at":"2024-10-24T09:44:12.005Z","updated_at":"2025-05-12T23:51:31.655Z","avatar_url":"https://github.com/shomali11.png","language":"Go","readme":"# proper [![Build Status](https://travis-ci.com/shomali11/proper.svg?branch=master)](https://travis-ci.com/shomali11/proper) [![Go Report Card](https://goreportcard.com/badge/github.com/shomali11/proper)](https://goreportcard.com/report/github.com/shomali11/proper) [![GoDoc](https://godoc.org/github.com/shomali11/proper?status.svg)](https://godoc.org/github.com/shomali11/proper) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA `map[string]string` decorator offering a collection of helpful functions to extract the values in different types\n\n## Features\n\n* Retrieve data from a string map, in String, Integer, Float and Boolean types.\n* Return a default value in case of missing keys or invalid types\n\n# Examples\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/shomali11/proper\"\n)\n\nfunc main() {\n\tparameters := make(map[string]string)\n\tparameters[\"boolean\"] = \"true\"\n\tparameters[\"float\"] = \"1.2\"\n\tparameters[\"integer\"] = \"11\"\n\tparameters[\"string\"] = \"value\"\n\n\tproperties := proper.NewProperties(parameters)\n\n\tfmt.Println(properties.BooleanParam(\"boolean\", false)) // true\n\tfmt.Println(properties.FloatParam(\"float\", 0))         // 1.2\n\tfmt.Println(properties.IntegerParam(\"integer\", 0))     // 11\n\tfmt.Println(properties.StringParam(\"string\", \"\"))      // value\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshomali11%2Fproper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshomali11%2Fproper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshomali11%2Fproper/lists"}