pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/emoji/examples_test.go (about)

     1  package emoji
     2  
     3  // ////////////////////////////////////////////////////////////////////////////////// //
     4  //                                                                                    //
     5  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
     6  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     7  //                                                                                    //
     8  // ////////////////////////////////////////////////////////////////////////////////// //
     9  
    10  import (
    11  	"fmt"
    12  )
    13  
    14  // ////////////////////////////////////////////////////////////////////////////////// //
    15  
    16  func ExampleGet() {
    17  	fmt.Println(Get("zap"))
    18  	// Output: ⚡️
    19  }
    20  
    21  func ExampleGetName() {
    22  	fmt.Println(GetName("⚡️"))
    23  	// Output: zap
    24  }
    25  
    26  func ExampleFind() {
    27  	fmt.Printf("%#v\n", Find("baby_"))
    28  }
    29  
    30  func ExampleEmojize() {
    31  	fmt.Println(Emojize("Hi :smile:!"))
    32  	// Output: Hi 😄!
    33  }