src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

file.go (229B)


      1 package store
      2 
      3 import "os"
      4 
      5 const (
      6 	fm  os.FileMode = 0700
      7 	ext             = ".json"
      8 )
      9 
     10 func hasExt(s string) bool {
     11 	if len(s) <= len(ext) {
     12 		return false
     13 	}
     14 	if s[len(s)-len(ext):] != ext {
     15 		return false
     16 	}
     17 
     18 	return true
     19 }