go-modules

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2023 License: MIT

README


Platforms license

Code of Conduct Support Contribution


Project Template

Please add project description here.

Contributor Covenant

Github Actions

Table of Contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites
  • Git installation (Dude, please...)

    • Run this command:
      apt-get -y install git
      
      Or
      yum -y install git
      
  • golang-ci is one of the IMPORTANT packages. Any developer who will maintain this project should install it. The installation command is as follows:

    go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
    
  • Everytime the code is updated, please run following command:

    golangci-lint run ./...
    
    • Whenever you get RED colored logs, means that YOU ARE ABSOLUTELY need to fix that before finalize your work (e.g. Make a PR)
      • An example of an error log:
        pkg/router/handlers/user.go:19:6: `xxx` is unused (deadcode)
        type xxx struct {
             ^
        
    • The only log that can be ignored is the WARN, such as:
      WARN [linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
      
Installation
  • TO BE ADDED

Development

  • Release 1.0 : Not Available Yet.

Usage

  • TO BE ADDED

Configurations

  • TO BE ADDED

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Looking to contribute to our code but need some help? There's a few ways to get information:

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Misc

  • Golang CI Lint

    • Installation command:
        go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
      
    • Usage: golangci-lint run <folderName>
      • Example 1: golangci-lint run cmd/...
      • Example 2: golangci-lint run pkg/...
  • using go-modules WITH tag

    • Once you finished added updates in this go-modules, please finalize the work by adding a new tag
    • create new tag:
      git tag -a <YOUR-TARGET-VERSION>
      
      • for example:
        git tag -a v0.0.3 -m "add `licence_revoked` field in `identities` storage module"
        
    • add tag to the remote:
      git push --tags
      
      
      
  • Preparing the go.mod and go.sum (ref)

    • Init: go mod init github.com/satumedishub/go-modules
    • Tidy up: go mod tidy
  • In case we had created a new tag, but we want to re-install the corresponding package with the latest version. We need to delete the old one from our local repository. Here is the command:

    sudo rm -fr $(go env GOPATH)/pkg/mod/github.com/satumedishub/'go-modules@v0.0.2'/
    
    • where v0.0.2 is the version we want to remove

Copyright © 2022 Private use in within the SatuMedis Development Team. All Rights Reserved.

Directories

Path Synopsis
pkg
enums/emoji
Package emoji provides all possible emoji to use ref 1: https://apps.timwhitlock.info/emoji/tables/unicode ref 2: https://www.unicode.org/emoji/charts/full-emoji-list.html
Package emoji provides all possible emoji to use ref 1: https://apps.timwhitlock.info/emoji/tables/unicode ref 2: https://www.unicode.org/emoji/charts/full-emoji-list.html
logger
Package logger provides functions to set up a new logger
Package logger provides functions to set up a new logger
utils/httputils
Package httputils provides utilities for HTTP related operations
Package httputils provides utilities for HTTP related operations
web
Package web provides all common operations related with web
Package web provides all common operations related with web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL