Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleGroup (0.1 sec)

  1. src/log/slog/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package slog_test
    
    import (
    	"log/slog"
    	"net/http"
    	"os"
    	"time"
    )
    
    func ExampleGroup() {
    	r, _ := http.NewRequest("GET", "localhost", nil)
    	// ...
    
    	logger := slog.New(
    		slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
    			ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 14:56:30 UTC 2023
    - 857 bytes
    - Viewed (0)
Back to top