Giter Site home page Giter Site logo

egasimov / aznum2words Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 6.0 2.78 MB

[AZ] Azərbaycan dilində ədədlərin sözlə yazılış təsviri üçün Go dilində yazılmış kitabxana. [EN] The library for converting numbers to words in the Azerbaijan language written in Go.

License: MIT License

Go 97.19% Makefile 2.28% Dockerfile 0.53%
golang-library number-to-words converter num2words azerbaijani numbers azerbaijani-translation conversion numbers-to-text numbers-to-words

aznum2words's People

Contributors

bago1 avatar egasimov avatar mehdiyevcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aznum2words's Issues

Feature: Run project as web app | Introduce Web API

As for now, AzNum2Words can be utilized in two ways:

  • Library (via importing into go-projects)
  • CLI app(build binaries and executing it)

For the people who have no experience with Go language or their already existing system is not compatible to integrate via go library, it would be nice to have another option to use AzNum2Words in somehow.

The proposed solution is ability to run AzNum2Words as microservice and having its well-defined API. So as the result, consumers will able to use functionalities offered by AzNum2Words via calling its exposed API, basically endpoints.

Initially, it was thought that developing web app exposing REST API due to its simplicity and having wider range of uses in the industry. (gPRC support can be added later on demand)

Simple saying, new feature is to develop web app exposing AzNum2Words functionalities as REST API to consumers.

There are few requirements for new feature that need to be considered while developing it.

  1. Prepare open-spec contract based on OpenAPI 3.0
    1.1. Code-generator
    tools such as oapi-codegen can be used to generate models, server-side codes to minimize human errors.

  2. It needs to be highly configurable via config file, environment variables.( e.g godotenv) [MUST]

  3. Able to run web-app both on locally and containerized environment. [MUST]

  4. Write tests to increase maintainability and code quality [MUST]

  5. Observability purpose requirements [[DESIRED]]
    5.1. Add Health check purpose endpoints
    5.2. Expose metrics
    5.3. Do properly error handling, logging

Bug: CLI app installation command described in Readme does not work as expected

Description
Installing the CLI application using the provided command does not work as expected. The command must specify a package that points to the cli, not the executable file.

Current:
go install github.com/egasimov/aznum2words/cmd/cliapp/aznum2words-cli@latest

Should be:
go install github.com/egasimov/aznum2words/cmd/cliapp@latest

In order for the command to work as expected the name of the cli app package also needs to be changed.

To Reproduce

  1. Execute the following command:
    go install github.com/egasimov/aznum2words/cmd/cliapp/aznum2words-cli@latest

  2. Result:
    go: github.com/egasimov/aznum2words/cmd/cliapp/aznum2words-cli@latest: module github.com/egasimov/aznum2words@latest found (v0.1.0), but does not contain package github.com/egasimov/aznum2words/cmd/cliapp/aznum2words-cli

Expected behavior
The command installed the binaries into $GOPATH/bin properly, and command should work with provided examples.

Desktop:

  • MacOS Monterey 12.2
  • Go version go1.19.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.