github.com/traefik/yaegi@v0.15.1/_test/issue-1101.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"net/http"
     6  )
     7  
     8  func main() {
     9  	method := "POST"
    10  	switch method {
    11  	case http.MethodPost:
    12  		fmt.Println("It's a post!")
    13  	}
    14  }
    15  
    16  // Output:
    17  // It's a post!