This Is The BEST Way To Structure Your GO Projects

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • World of Go programming language! 🚀 Whether you're a complete beginner or an experienced developer looking to explore Go, this video has something for everyone.
    🔧 Installing Go Lang:
    With easy-to-follow instructions, you'll have Go up and running on your machine in no time.
    📁 Directory Layout Best Practices:
    We discuss the recommended directory structure for a typical Go project. Learn how to keep your codebase clean and easy to navigate, separate concerns, and follow the best practices that the Go community loves.
    Go Project Layout GitHub:
    github.com/gol...
    Twitch
    I stream live on Twitch every weekend
    Twitch : / melkey
    Join the amazing community on Discord
    Discord: / discord
    I post memes and host Twitter Tech Spaces
    Twitter: / melkeydev
    SUBSCRIBE OR GET LAID OFF
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
    #coding #neovim #typescript #programming #vim #softwareengineering #codinglife #webdesign #webdevelopment #webdev #javascript #rustlang #rust #twitch #twitchstreamer #programmerhumor #codinghumor #software #softwareengineer #softwaredeveloper #softwaredevelopment #gymbro #gym #programmerhumor #programming #coding

Комментарии • 188

  • @MelkeyDev
    @MelkeyDev  Год назад +39

    GO CONTENT IS AWESOME!
    I HOPE YOU ALL ENJOY IT.
    MAKE SURE TO COMMENT AND SUBSCRIBE- it really means the world

    • @PeterPatrick-uq5ef
      @PeterPatrick-uq5ef 10 месяцев назад

      Melky, what do you advise, I just started learning Go as I am new to software dev world, but some what seem confusing sometimes. Topic like Pointers; I am struggling to really understand it deeply, and a few others. Can you advice on howto go about it - recommend materials that can easily break it down for me. I am really interested in learning getting as far as building API's, Micro-services. I know that for a newbie, it seem like a daunting task; i do believe i can achieve it. I am not totally new to IT world, I have worked as a network engineer, and now looking to become a software engineer; Specifically a back-end or full stack. I do have a bit of the basic knowledge of variables, functions, struct, boolean, integer, float etc. i know basic python programming, html, css , docker, i use vagrant as IAC for my private test environment, Linux, basic knowledge of Git & Github, cloud services - aws cloud services, Splunk enterprise software installlation, monitoring and for onboarding data.
      I will appreciate your sincere advice? Thank you very much.

    • @PeterPatrick-uq5ef
      @PeterPatrick-uq5ef 10 месяцев назад +1

      And if you could recommend a good trainer that can help with other programming language(JS, Java..etc) along with Go, I will be most grateful

  • @GustavoDiaz93
    @GustavoDiaz93 Год назад +61

    There is no a “best” way to structure your projects.

    • @2gbeh
      @2gbeh 7 месяцев назад +3

      THERE ABSOLUTELY IS

    • @pieterrossouw8596
      @pieterrossouw8596 6 месяцев назад +4

      but there are many terrible ways to structure codebases. Gotta keep the WTFs/min low.

    • @kaioneal6160
      @kaioneal6160 5 месяцев назад

      We have a new videos series idea .
      How to not structure your go projects

    • @tobi-b
      @tobi-b 7 часов назад

      There is but its project dependent.

  • @choleralul
    @choleralul Год назад +2

    Love Go! let's goo Melkey!!

  • @AnatolyLeonov
    @AnatolyLeonov 4 месяца назад +1

    Thanks for the descriptioN!

  • @mrjson3039
    @mrjson3039 Год назад +10

    3 days ago I started my journey as a go developer. I wanted to learn something new and since I can't find work with my current knowledge of js I decided give a GO haha. This type of content is invaluable for me, thanks Melkey.

  • @cariyaputta
    @cariyaputta Год назад +2

    This "standard" layout sucks, it's a convoluted mess. Ask yourself this question: Am I developing a library/tool or an application? For application development, there's no "standard" layout, start with the simplest flat project structure and go from there.

  • @henrikchristensen65688
    @henrikchristensen65688 Год назад +8

    Wait... what? Tests in a separate folder? 😳

    • @GustavoDiaz93
      @GustavoDiaz93 Год назад +2

      Mmm first time I see this recommendation, in Go we tend to have the test files next to the code we’re testing.

    • @henrikchristensen65688
      @henrikchristensen65688 Год назад

      @@GustavoDiaz93 yeah

    • @gearboxworks
      @gearboxworks 7 месяцев назад +4

      @@GustavoDiaz93- Apples and oranges. Units tests in the same directory, integration tests in a ./test directory.

    • @chandup
      @chandup 7 месяцев назад

      I see an advantage (there might be better approaches too):
      - if you want to ignore tests while building final go application container image. This reduces your final code base you are delivering. Just use test files for dev & testing phase.
      But for easy human consumption when looking at code base, test folder should follow the same structure as main code base, so that it’s easy to relate the relationships between folders and test files to the main code base folders and code files.
      Maybe someone here can provide more insights.

    • @呀咧呀咧
      @呀咧呀咧 11 дней назад +1

      ​@@gearboxworksYeah

  • @Learn_IT_with_Azizul
    @Learn_IT_with_Azizul Год назад +1

    nice,,, but, plz proceed with more hands on.... then it would be better for the audience. Ty

  • @vormavius
    @vormavius 11 месяцев назад +2

    I charge like 50% extra amount when I have to work on a project with this structure.

  • @pavelastraukh9905
    @pavelastraukh9905 Год назад

    Thank you so much. For last few years I was programming in ruby using rails framework where layout is defined by framework and I was really struggling with figuring out what layout to use.

  • @manankoyawala5337
    @manankoyawala5337 7 месяцев назад +2

    Hey bro give me tip how you change your terminal look can you make video because I like your terminal look which is very fancy

  • @agentbabs_yt
    @agentbabs_yt 10 месяцев назад +5

    Absolute lifesaver.. I was struggling with getting local imports to work after a tutorial refactored code into subdirectories. thank you for this!

    • @MelkeyDev
      @MelkeyDev  10 месяцев назад +1

      My pleasure boss - glad you enjoyed

  • @everythinggoes850
    @everythinggoes850 Год назад +3

    I agree with everything except the pkg directory. For me it creates an unnecessary indirection.

    • @MelkeyDev
      @MelkeyDev  Год назад +1

      I honestly agree with you.
      I have only used internal in my projects (the demo shows that) but the convention for a lot of people was to include pkg as well

  • @bumpy_lumps
    @bumpy_lumps Год назад +2

    All these kids talking about Pokemon Go need to Pokemon Go write some Go

  • @Chronofrost001
    @Chronofrost001 8 месяцев назад +3

    I have been a C# dev for over 15 years and wanted to try something else so a few days ago i picked up a GO course. This video has been a great addition to the other things i have. Thanks.

  • @emil_l889
    @emil_l889 Год назад +1

    This video was so good I got promoted to cto instantly

  • @ahmeism90
    @ahmeism90 Год назад

    wow, happy see some nice educative golang content. i would love yo see some real world api project with best practices. Just like you would do for some clinet

  • @mouhannadal-hmedi1501
    @mouhannadal-hmedi1501 10 месяцев назад +1

    amazing!
    thanks

  • @nyantaro1
    @nyantaro1 Год назад +1

    Love you melkey

    • @MelkeyDev
      @MelkeyDev  Год назад

      I love you too thank you

  • @kchak14
    @kchak14 4 месяца назад

    Can you make a video on or share resources for Unit Testing in Go? Specifically, code coverage reports on a Windows machine.

  • @joja2174
    @joja2174 6 месяцев назад +1

    Me: Tests = 🤮🤮🤮
    5 minutes Later: * complains about bugs *

    • @MelkeyDev
      @MelkeyDev  6 месяцев назад

      The hell is a test

  • @JayJay-ki4mi
    @JayJay-ki4mi 10 месяцев назад +2

    Recovering Rust developer here.

  • @thingsiplay
    @thingsiplay Год назад +2

    I know you from Prime reacting to your meme videos. :D
    Just started learning Go after Rust and Python. Looked into Haskell and Zig first. Zig is still not at version 1.0 and Haskell is, well it's Haskell. So I go with Go for now. And the project layout was one of the first things I wondered. This and probably your other videos will help me for sure.

  • @paulclarke4099
    @paulclarke4099 Год назад +3

    Can you please create a video discussing Workspaces and there uses. Thanks for the great content 💯😃👍

    • @MelkeyDev
      @MelkeyDev  Год назад

      Yeah - for sure But what do you mean? Can you be more specific?

    • @paulclarke4099
      @paulclarke4099 Год назад +1

      @@MelkeyDev Just why would one use workspaces in the first place, do I actually need them or not, what is there general purpose of them, that sort of thing 👍

    • @MelkeyDev
      @MelkeyDev  Год назад

      @@paulclarke4099 Workspaces (the Go workspaces) are used when you are potentially working in a Monolith, or a project structure that has multiple non-go sub dirs. For example, you can have your React code in the client folder, while your Go code is in another.

  • @viktorkrepak
    @viktorkrepak 7 месяцев назад +3

    Well structured video without any water, thanks for your work Melkey!

    • @MelkeyDev
      @MelkeyDev  7 месяцев назад

      Absolutely, hope you enjoy it !

  • @naresh_deeti
    @naresh_deeti 5 месяцев назад

    In Go, why functions name should be in PascalCase, why lib/dependency called package

  • @alexandersemionov5790
    @alexandersemionov5790 Год назад +3

    ok, have to admit - this was useful. I just started going deeper in Go and was missing the point of long import statements. Genuine thank you

  • @zevo92
    @zevo92 Год назад +1

    1. Nice video
    2. I may be dumb, but the first link you put in the right top corner, just takes me to " more from Melkey", which I think you did not intended. I'll put my thinking cap on and find that video, but I wanted to say this maybe it's a bug?!

    • @MelkeyDev
      @MelkeyDev  Год назад

      Oh my.
      I am SO sorry.
      ruclips.net/video/OCotIc2Ah_0/видео.html&t
      This is the video. Thank you for catching that!

    • @zevo92
      @zevo92 Год назад

      @@MelkeyDev I’m something of scientist, and I found it myself. View it, liked it. Thank you sir! Cheers!

  • @muratasarslan2359
    @muratasarslan2359 8 месяцев назад

    Heyy Melkey, wonderful video. Very helpful. Would like to create a realistic REST api targeting prod making use of this structure with you 😺

  • @CYB3Rsynth
    @CYB3Rsynth 28 дней назад

    4:00 for the actual point (typical bro-tubing bro-grammer taking forever to get to the point)

  • @medilies
    @medilies Год назад +2

    The chase is cut at 3:52

  • @vikingthedude
    @vikingthedude 11 месяцев назад +1

    What if we create a cmd/main.go instead of nesting it within another folder?

  • @omarcrosby
    @omarcrosby 11 месяцев назад +2

    Can you explain why you prefer to keep tests in a separate folder instead of next to the files they are intended to test? Just curious.

    • @chandup
      @chandup 7 месяцев назад

      I see an advantage (there might be better approaches too):
      - if you want to ignore tests while building final go application container image. This reduces your final code base you are delivering.
      But for easy human consumption when looking at code base, test folder should follow the same structure as main code base, so that it’s easy to relate the relationships between folders and test files to the main code base folders and code files.
      Maybe someone can add more insights here.

  • @Akashchauhan-rt4zj
    @Akashchauhan-rt4zj 8 месяцев назад

    Hating windows and using “ubuntu”…peak level bullshit
    I also use “ubuntu” btw

  • @Cordic45
    @Cordic45 6 месяцев назад

    nice job
    GOPATH vs go module really make me confused

  • @ali-ozen
    @ali-ozen 9 месяцев назад +1

    what is your guake theme?

  • @user-fb2cb6xp7c
    @user-fb2cb6xp7c 9 месяцев назад

    I almost killed myself while trying to arrange my golang project

  • @melkeydevvods7698
    @melkeydevvods7698 Год назад +7

    GO IS AWESOME!!
    I hope you enjoy it.
    Make sure to like, comment for MORE GO CONTENT!

    • @thingsiplay
      @thingsiplay Год назад

      You are an imitator and fake of this channel??? Using same icon and name, but are not linked in the official channels list of channels.

  • @Zmey5656
    @Zmey5656 7 дней назад

    I didn't recognize you with the mustache.

  • @BrunoidGames
    @BrunoidGames 5 месяцев назад +1

    Go 1.22 have router wildcards \m/

    • @MelkeyDev
      @MelkeyDev  5 месяцев назад +1

      Oh HELL yes i didnt know this

    • @BrunoidGames
      @BrunoidGames 5 месяцев назад

      @@MelkeyDev I mean.. Go, not Docker.. xD

  • @georgejoseph2601
    @georgejoseph2601 7 месяцев назад +1

    This is why more people need experience with battle-tested monolithic frameworks like Rails or Django

  • @roberto_camp
    @roberto_camp 4 месяца назад

    so it's unconventional to have main.go at the actual root of the project?

  • @JammUtkarsh
    @JammUtkarsh Год назад +1

    The layout of opened file is like the one in focus mode. But you have ribbons in that too.
    I need that one. pls share or just make a video on your dev setup(i know it's pretty classic one but pls its needed.)

    • @stevezhang3869
      @stevezhang3869 9 месяцев назад +1

      just disable vscode activity bar, or enter focus mode and key Ctrl + Shift + E

  • @popplestones886
    @popplestones886 6 месяцев назад

    Why the hate on nesting packages?

  • @alcb1310
    @alcb1310 Год назад +1

    Wait what, do you actually test??? Lol
    Ok in a serious note, you should make a video on go testing

  • @Doomdave1992
    @Doomdave1992 Год назад +2

    Enjoying the content Melkey! I don’t code in Go at all but watching these makes it feel like I could do it tomorrow

  • @bpa5721
    @bpa5721 7 месяцев назад +1

    Writing Go for a living. I am jelly.

    • @MelkeyDev
      @MelkeyDev  7 месяцев назад +1

      You can do it too!

  • @bradleyfrueh2761
    @bradleyfrueh2761 Год назад +1

    Is golang useful for data science? I know python has all the libraries but its slow. Could golang fill in the gaps of python?

    • @MelkeyDev
      @MelkeyDev  Год назад

      Great question.
      I personally dont think so.
      I think Python will be the data science language for a while.
      Or Julia

  • @AylaCroft
    @AylaCroft 10 месяцев назад +1

    😅 I need to learn Go. I think Backend dev is adding Go to their courses.

    • @MelkeyDev
      @MelkeyDev  10 месяцев назад

      Go is the BEST

  • @MisfitsFreshToDeath
    @MisfitsFreshToDeath 11 месяцев назад +1

    Ackshually, on Linux theyr'e called directories not folders

    • @MelkeyDev
      @MelkeyDev  11 месяцев назад

      lmfao get out of here

  • @Cyber_Lanka
    @Cyber_Lanka Год назад +1

    Hey what about the embed package? I don't think it's possible to embed static files outside of cmd directory or handlers.

    • @stevezhang3869
      @stevezhang3869 9 месяцев назад

      it says adjust this project/package1/package2/package3 to project/package1, project/package2, project/package3

  • @rootdefault6263
    @rootdefault6263 5 месяцев назад

    So this might be a very noob question. Am still a beginner in go coming from a Laravel world (YES I CODE IN PHP). where would you place your middle ware, database related files like configuration,queries and your HTML pages (of course with its assets).
    so far I have been trying to build a simple crud project and its working well but its terrible in terms of structure and maintenance for a serious project is a nightmare. your guide will be very much appropriated you earned my sub by the way Much love from TANZANIA

  • @poggybitz513
    @poggybitz513 9 месяцев назад

    what the f is "test"? this is the firs time I am hearing this word.

  • @JoeNgera
    @JoeNgera 3 месяца назад +1

    Wow man. You just demistified a lot for me. Thank you

    • @MelkeyDev
      @MelkeyDev  3 месяца назад

      AYe - thats awesome!

  • @manfrombritain6816
    @manfrombritain6816 8 месяцев назад

    i can't actually explain why but i like Go. the syntax feels a bit ... i dunno it's sort of like moving from speaking to English to German... everything seems to be in a slightly different order.
    but i like it

  • @teej_dv
    @teej_dv Год назад +1

    this doesn't look like ocaml?

  • @ehSamurai3483
    @ehSamurai3483 5 месяцев назад

    I have a question, like in JS/nodejs we have a folder thats specific to a project called "node_modules", don't we have something like it in golang?

  • @rohithgilla9492
    @rohithgilla9492 Год назад +1

    Thanks for making such awesome content, what’s your prefer way to deploy go apps, can we have a video on that if possible

  • @NoctuaDeveloppement
    @NoctuaDeveloppement Год назад

    Amazing content !
    Maybe it's a useless question but is it better to use Gin or Go the hard way to build a full Rest API ?

    • @MelkeyDev
      @MelkeyDev  Год назад +1

      i mean, you can definitely use Gin but I think using Go built in lib is nice!

    • @NoctuaDeveloppement
      @NoctuaDeveloppement Год назад

      @@MelkeyDev Yeah it's definitely what I did, builtin lib and no ORM to learn the basics of the language 😃 Thank's for the answer 😀

  • @cbbcbb6803
    @cbbcbb6803 4 месяца назад

    And if I do not use github ...?

  • @clouds_304
    @clouds_304 Год назад +1

    Why is the one tag neovim 😂

  • @GV14982
    @GV14982 Год назад +1

    Do you have any suggestions for handling a go monorepo?

    • @MelkeyDev
      @MelkeyDev  Год назад +1

      It is typically the same structure, just with more sub directories within the /internal

  • @mr.togrul--9383
    @mr.togrul--9383 Год назад +2

    HTMX +SVELTE+GO booom make it happen

  • @IanHamilton-hm9xm
    @IanHamilton-hm9xm 3 месяца назад

    No provided code repo?

  • @0xDEAFBEEF
    @0xDEAFBEEF 6 часов назад

    "recovering rust developers" 🤣🤣🤣

  • @CodeWithRivandra
    @CodeWithRivandra 5 месяцев назад

    Man please zoom in 😂

  • @karimshakirov
    @karimshakirov Год назад +1

    Use Arch btw

  • @dan_le_brown
    @dan_le_brown 4 месяца назад

    I have watched this video couple of times and "you guys don't write tests 😂" always get me rolling

  • @chineduekeneokpala3407
    @chineduekeneokpala3407 6 месяцев назад

    I want to be good at test

  • @pylotlight
    @pylotlight Год назад

    The biggest annoyance for me has been maintaining go versions and updates. Theres no inbuilt go update latest. you have to know the latest version number and manually manage that, then manually manage env vars which is also gross, I shouldn't have to be touching that imo.

  • @benkogan1579
    @benkogan1579 7 месяцев назад

    I see a lot of projects put a test file right next to the source file / package it's testing, i.e. no tests directory. Not sure I have a strong opinion on one or the other.

  • @IkraamDev
    @IkraamDev Год назад +1

    Keep up the Golang videos!

  • @vikingthedude
    @vikingthedude 11 месяцев назад

    Do we gitignore the bin directory? Considering that the contains the output build, we wouldn’t wanna track that in version control right?

  • @tarn_jihas
    @tarn_jihas Год назад +1

    first hi

  • @kubre
    @kubre Год назад +1

    More go content

  • @tanrosa
    @tanrosa 11 месяцев назад

    Maybe it is only down to the guys, because I am really keen on testing!! 10:53 #GirlsInTech #WeGotPower

  • @markjameshender3592
    @markjameshender3592 8 месяцев назад

    Recommended this channel and then I hear keep tests in a separate folder. Keep e2e and integration there only. Don't make people search that nest for unit tests..

  • @Muhammed-nani964
    @Muhammed-nani964 Год назад +1

    The go guy
    I started switching to go we need more tutorial and projects 😂

    • @MelkeyDev
      @MelkeyDev  Год назад +1

      OKAY!
      What do you want to see?

    • @Muhammed-nani964
      @Muhammed-nani964 Год назад

      @@MelkeyDev my an entire crash course of web api creation with go MySQL (with auth too)
      Or a simple project 😁

  • @MrKeliv
    @MrKeliv Год назад +5

    When I create go project. I always follow MVC like PHP framework folders.
    - routes -> routes.go
    - models -> post.go
    - databases -> database.go
    - controllers -> post_controllers.go, etc
    - views ->
    - layouts -> layout.html
    - pages -> home.html, about,html, etc
    - middlewares -> auth.go
    main.go
    go.mod
    I dont know its good or bad. But it make easier for me to trace something and so familiar with other projects with different languages.

    • @dan_le_brown
      @dan_le_brown 10 месяцев назад +1

      I'd do the same too

    • @matthewrossee
      @matthewrossee 10 месяцев назад +3

      It sucks because you're grouping by technical concerns. It's better to group by a feature because it's more cohesive and functionality related to "post" isn't scattered all over the project. Your project structure should tell what the application is about.

    • @myfamily2503
      @myfamily2503 9 месяцев назад

      @@matthewrosseeI will do with inherit in all codes. Sometimes we need nested feature. So I will include in same folder but tell what about of this file.
      Ex.
      models -> post_comment.go
      controllers -> post_comment_controllers.go
      pages -> post_comment.html

    • @krskvBeatsRadio
      @krskvBeatsRadio 8 месяцев назад

      @matthewrossee you have a point but what if your application has only one feature? Then all files would end up in one folder creating a total mess
      I think such grouping is much better suited for non-microservice project

    • @gearboxworks
      @gearboxworks 7 месяцев назад +1

      Not good, because directory=package in Golang, and that means you are grouping code that should be in the same package into different packages and that can create all kind of unnecessary complexity like import cycles and then interfaces needed *just* to resolve import cycles.
      Think this rule of thumb: If you were to extract any given functionality to use in another app, what files would you need? All those files should then be kept in the same directory/package.

  • @lobokun
    @lobokun Год назад +1

    can i delete my test folder if i do not use it?

    • @konjikiyami7301
      @konjikiyami7301 Год назад

      Yes, there is no need to create directories your project does not need as Go doesn't have as strict of project structure compared to other languages. Of course, there are a few exceptions, but the case you described is not one such.

  • @guhkunpatata3150
    @guhkunpatata3150 Год назад

    "I know you do not create test"
    that's not me. i created the folder test
    then delete it after 5 seconds.

  • @adimail2404
    @adimail2404 8 месяцев назад

    I test

  • @shubhicodes
    @shubhicodes Год назад +1

    started learning GO great share Melkey

  • @rafael.aloizio1769
    @rafael.aloizio1769 7 месяцев назад

    you can't give credits to someone that keep mocking windows like that

  • @krislui852
    @krislui852 Год назад

    just started on go recently and struggling with structuring my project. watched a couple videos on that but seems like opinions are quite contradicting. anyway, great walkthrough, helps a lot

  • @akileshkumarb7750
    @akileshkumarb7750 7 месяцев назад

    2:57 felt personally attacked

  • @musdevfrog
    @musdevfrog Год назад +1

    Thanks Mr. VS C*de user.

  • @bobhutchinson3638
    @bobhutchinson3638 4 месяца назад

    3:50

  • @LacksonMunthali
    @LacksonMunthali Год назад +1

    All you have to do is click the big blue button then booom!!! you are hoocked 😅

  • @mddawid0323
    @mddawid0323 10 месяцев назад

    Great video, I have learnt a lot.
    One question, how to create multiple folders with mkdir command on windows powershell? The method you have used on linux does not work.

    • @MelkeyDev
      @MelkeyDev  10 месяцев назад +1

      I am not sure - I dont develop on Windows. I don't recommend it

  • @pocketmayo
    @pocketmayo Год назад +1

    Hi dad

  • @sambacarlson
    @sambacarlson 2 месяца назад

    very useful. Thanks man

  • @XxwookiedancerxX
    @XxwookiedancerxX Год назад +1

    test

  • @dentforpersonal
    @dentforpersonal 7 месяцев назад

    Great Video! I learned a lot. But why does all the module need to have the github prefix ?

    • @MelkeyDev
      @MelkeyDev  6 месяцев назад

      They dont! Just if you want to make them public its a common pattern to do it like that

  • @Endurancecoach00
    @Endurancecoach00 Год назад +1

    Dope vid as always super helpful

  • @umardev500
    @umardev500 5 месяцев назад

    bad strucure

    • @CYB3Rsynth
      @CYB3Rsynth 28 дней назад

      You gonna explain that opinion chief?

  • @kiryosity_
    @kiryosity_ Год назад

    Thank you for video!
    I have a question related to tests. How can I keep my tests in a separate folder if I want to test not exported (private) function within my package?
    Anyway, it would be nice to see how you'd recommend organise your tests :)
    Thanks!

    • @David-gj6dc
      @David-gj6dc 8 месяцев назад

      I don't know about separating folders but in principle you should not be invoking private functions. Unit testing should only interface with the public API and treat it's internal calls as a black box.

  • @kodder
    @kodder Год назад +1

    half asleep still, been trying to write something witty as comment...I got nothing. I failed myself.

  • @RandomShowerThoughts
    @RandomShowerThoughts Год назад

    Personally I don’t like having a test directory, the tests should be near the source code with a _test name

    • @gearboxworks
      @gearboxworks 7 месяцев назад

      Unit tests should be near the code, integration tests should be in their own directory.

  • @emil_l889
    @emil_l889 Год назад +2

    Greatest Go content on RUclips GLOBALLY

    • @MelkeyDev
      @MelkeyDev  Год назад +1

      Continuing this GO TRAIN