مقدماتی
Go
Go را از ابتدا تا انتها یاد بگیرید. با پکیجها، متغیرها و جریان کنترل شروع کنید، سپس عمیقتر وارد ساختارها، اینترفیسها، همزمانی، تست، سرورهای HTTP، پایگاه داده، جنریکها، پروفایلینگ و انتشار باینریهای واقعی در محیط تولید شوید.
20 درس12.3h عملی11 زبان
یادگیری رایگان را شروع کنGo دوره20 درس، به ترتیب
- 125 دقیقه
سلام، گو
Package mainImportFunc mainFmt.PrintlnGo run - 225 دقیقه
متغیرها و انواع داده
Var declarationShort declaration :=IntFloat64StringBool+2 - 330 دقیقه
کنترل جریان: if و for
IfElse ifElseFor loopFor as whileInfinite for+2 - 430 دقیقه
توابع
Func keywordParametersReturn valuesMultiple return valuesNamed return valuesBlank identifier - 535 دقیقه
برشها و نقشهها
Slice literalAppendLenIndexingRangeMap literal+2 - 640 دقیقه
پروژه نهایی CLI کوچک
Os.ArgsStrconv.AtoiError handling with if err != nilOs.ExitGo buildPutting it together - 735 دقیقه
ساختارها و اشارهگرها
Struct definitionField accessZero values for structsPointer types& and * operatorsPointer receivers vs value receivers+1 - 835 دقیقه
متدها و اینترفیسها
Method declarationReceiver typesPointer vs value receiversInterface definitionImplicit interface satisfactionSmall interfaces+1 - 935 دقیقه
مدیریت خطا
Error interfaceFmt.Errorf with %wErrors.IsErrors.AsCustom error typesPanic vs error+1 - 1040 دقیقه
گوروتینها و کانالها
The go keywordGoroutine lifetimeUnbuffered channelsBuffered channelsSend and receiveRange over channel+1 - 1145 دقیقه
الگوهای همزمانی
Select statementContext.Context for cancellationSync.WaitGroupSync.MutexWorker pool patternFan-out fan-in idea - 1240 دقیقه
گشتی در کتابخانه استاندارد
FmtStringsStrconvTimeOsBufio+1 - 1340 دقیقه
آزمایش و معیارهای سنجش
Go testTesting.TTable-driven testsT.Run subtestsTesting.B benchmarks_test.go file naming+1 - 1435 دقیقه
ماژولها و ساختار پروژه
Go mod initGo.mod and go.sumImport pathsPackage vs moduleInternal/ folderCmd/ layout+1 - 1545 دقیقه
سرورهای HTTP
Net/httpHttp.HandleFuncHttp.ServerJSON responsesRequest routingMiddleware via http.Handler wrapping+1 - 1645 دقیقه
پایگاههای داده با database/sql
Database/sql packageDriver importsSql.Open and sql.DB poolExec vs Query vs QueryRowPrepared statementsScanning rows+1 - 1735 دقیقه
جنریکها
Type parameters with [T any]ConstraintsComparableTilde approximation ~intGeneric Map and FilterWhen generics help, when they do not - 1840 دقیقه
عملکرد و پروفایلسازی
Go test -benchPprof CPU and heap profilesEscape analysis with -gcflags=-mAvoiding unnecessary allocationsPreallocating slicesSync.Pool intuition - 1940 دقیقه
الگوهای طراحی در Go
Functional options patternRepository patternDependency injection via interfacesContext propagation through call stacksConstructor functions - 2045 دقیقه
استقرار و محیط تولید
CGO_ENABLED=0 static binariesCross-compile with GOOS and GOARCHGraceful shutdown with http.Server and signal.NotifyContextMinimal Dockerfile with scratch or distrolessReading config from environment variables
Go را به زبان خودت یاد بگیر
هر درس، آزمون و پاسخ مربی به زبان شما نمایش داده میشود. مربی هوشمند به همان زبانی پاسخ میدهد که شما سوال میکنید.
