Gomo - ๐Ÿ“ ๊ฐ„๋‹จํ•œ Golang ๋‹ค์ค‘ ๋ชจ๋“ˆ ๋„๊ตฌ.

3377 ๋‹จ์–ด githubbashtoolinggo





abdfnx / ๊ณ ๋ชจ


๐Ÿ“ ๊ฐ„๋‹จํ•œ Golang ๋‹ค์ค‘ ๋ชจ๋“ˆ ๋„๊ตฌ. ํ„ฐ๋ณด๋ ˆํฌ์—์„œ ์˜๊ฐ์„ ์–ป์—ˆ์Šต๋‹ˆ๋‹ค.




Gomo is a Simple Golang multi modules tool. inspired from turborepo



์„ค์น˜ โฌ‡



์Šคํฌ๋ฆฝํŠธ ์‚ฌ์šฉ


  • ๊ป๋ฐ๊ธฐ

  • curl -sL https://bit.ly/gomo-cli | bash
    


  • ํŒŒ์›Œ์…ธ

  • iwr -useb https://bit.ly/gomo-win | iex
    


    ๊ทธ๋Ÿฐ ๋‹ค์Œ ํŒŒ์›Œ ์‰˜์„ ๋‹ค์‹œ ์‹œ์ž‘ํ•˜์‹ญ์‹œ์˜ค

    ํ™ˆ๋ธŒ๋ฅ˜




    brew install abdfnx/tap/gomo
    


    ์šฉ๋ฒ•


  • ํ˜„์žฌ ํด๋”์— ์ƒˆ๋กœ์šด gomo.json ํŒŒ์ผ ์ƒ์„ฑ

  • gomo init
    


  • ์ƒˆ ๋ชจ๋“ˆ ์ดˆ๊ธฐํ™”

  • gomo init --mod github.com/x/x2 --path dir
    


  • ๋ชจ๋“  ๋ชจ๋“ˆ์„ ํ†ตํ•ด go ํŒจํ‚ค์ง€ ๋‹ค์šด๋กœ๋“œ

  • gomo
    


  • go ํŒจํ‚ค์ง€๋ฅผ ๊ฐ€์ ธ์™€์„œ ๋ชจ๋“  ๋ชจ๋“ˆ์— ์ถ”๊ฐ€ํ•˜์‹ญ์‹œ์˜ค.

  • gomo get github.com/gorilla/mux
    


  • ๋ชจ๋“  ๋ชจ๋“ˆ์„ ํ†ตํ•ด go ํŒจํ‚ค์ง€ ์‚ญ์ œ

  • gomo delete github.com/example/example1
    


  • ๋ชจ๋“  ํŒจํ‚ค์ง€ ์—…๋ฐ์ดํŠธ

  • gomo update
    


  • ๋ชจ๋“  ๋ชจ๋“ˆ์„ ๋นŒ๋“œํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๋ˆ„๋ฝ๋œ ํŒจํ‚ค์ง€๋ฅผ ์ถ”๊ฐ€ํ•˜์‹ญ์‹œ์˜ค.

  • gomo tidy
    


    ๊ณ ๋ชจ ๊ตฌ์„ฑ ํŒŒ์ผ




    {
      "cmds": {
        "download": "go mod download",
        "update": "go get -u"
      },
      "modules": [
        ".",
        "test",
        "test/web"
      ]
    }
    


    ์‹œ๊ฐ„ ๋‚ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๋งˆ์Œ์— ๋“œ์‹ ๋‹ค๋ฉด ์ €์žฅ์†Œ์— ๋ณ„ํ‘œ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ์„ ์žŠ์ง€ ๋งˆ์„ธ์š”.

    ์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ