github.com/blend/go-sdk@v1.20220411.3/web/no_content_result.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package web
     9  
    10  import "net/http"
    11  
    12  var (
    13  	// NoContent is a static result.
    14  	NoContent NoContentResult
    15  )
    16  
    17  // NoContentResult returns a no content response.
    18  type NoContentResult struct{}
    19  
    20  // Render renders a static result.
    21  func (ncr NoContentResult) Render(ctx *Ctx) error {
    22  	ctx.Response.WriteHeader(http.StatusNoContent)
    23  	return nil
    24  }