github.com/oarkflow/log@v1.0.78/fqdn/util_posix.go (about)

     1  //go:build !windows
     2  // +build !windows
     3  
     4  package fqdn
     5  
     6  func chomp(s string) string {
     7  	if len(s) > 0 && s[len(s)-1] == '\n' {
     8  		s = s[:len(s)-1]
     9  	}
    10  
    11  	return s
    12  }