Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/leetcode-golang-classroom/golang-finance-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/leetcode-golang-classroom/golang-finance-api

  • v0.0.0-20240714144407-45bbd41f2fe8
  • Source
  • Go
  • Socket score

Version published
Created
Source

golang-finance-api

This is sample of how to structure my golang restful api server

structure

  1. cmd

This folder is for executable package main with func main

  1. internal

This folder is for internal implementation not output as package

  1. pkg

This folder is for ouptut as package

for service purpose

透過把相同職責的元件放到同一個 service 資料夾 folder 下

比如這邊放在 service/auth 下的 go 檔案都是與操作 auth 相關

然後再根據不同的處理範圍分別取名不同,比如是處理 jwt 則放 jwt.go

處理網路請求路由則放 router.go

pkg

此資料夾用來放置可以開發對外使用的 library

比如這邊是針對 password 的操作

dependency-graph

dependency-graph

injection direction graph

injection-direction-diagram

FAQs

Package last updated on 14 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc