---
title: "Discussion on \"Stacking defers\" | Hashnode"
description: "Discussion on \"Stacking defers\". Deferred function calls are pushed onto a stack. When a function returns, \nits deferred calls are executed in last-in-first-out order.\nlets write a program to count numbers from 1 to 9\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(\"counti..."
url: "https://hashnode.com/posts/stacking-defers--deleted/6280e98e0094f2f13f516070"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Stacking defers](https://blog.cloudnativefolks.org/stacking-defers--deleted?utm_source=hashnode&utm_medium=feed)

Deferred function calls are pushed onto a stack. When a function returns, its deferred calls are executed in last-in-first-out order. lets write a program to count numbers from 1 to 9 package main import "fmt" func main() { fmt.Println("counti...

May 15, 2022 · 1 min read · blog.cloudnativefolks.org  
Updated May 16, 2022  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[Sangam Biradar](https://hashnode.com/@sangambiradar)

@sangambiradar · India

  
[View profile](https://hashnode.com/@sangambiradar)

AI Security

DevRel at StackGen | Formerly at Deepfence ,Tenable , Accurics | AWS Community Builder also Docker Community Award Winner at Dockercon2020 | CyberSecurity Innovator of Year 2023 award by Bsides Bangalore | Docker/HashiCorp Meetup Organiser Bangalore &amp; Co-Author of Learn Lightweight Kubernetes with k3s (2019) , Packt Publication &amp; also run Non Profit CloudNativeFolks / CloudSecCorner Community To Empower Free Education reach out me twitterhttps://twitter.com/sangamtwts or just follow on GitHub -&gt; https://github.com/sangam14 for Valuable Resources

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
